File tree 2 files changed +4
-4
lines changed
junit/io/sf/carte/doc/style/css/awt
src/io/sf/carte/doc/style/css/awt
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public void testGetAWTColor() throws CSSPropertyValueException {
42
42
CSSValue cssColor = style .getPropertyCSSValue ("color" );
43
43
assertNotNull (cssColor );
44
44
assertEquals (CssType .TYPED , cssColor .getCssValueType ());
45
- assertEquals (CSSValue .Type .RGBCOLOR , ((CSSTypedValue ) cssColor ).getPrimitiveType ());
45
+ assertEquals (CSSValue .Type .COLOR , ((CSSTypedValue ) cssColor ).getPrimitiveType ());
46
46
Color color = AWTHelper .getAWTColor ((CSSTypedValue ) cssColor );
47
47
assertNotNull (color );
48
48
assertEquals (8 , color .getRed ());
@@ -54,7 +54,7 @@ public void testGetAWTColor() throws CSSPropertyValueException {
54
54
cssColor = style .getPropertyCSSValue ("color" );
55
55
assertNotNull (cssColor );
56
56
assertEquals (CssType .TYPED , cssColor .getCssValueType ());
57
- assertEquals (CSSValue .Type .RGBCOLOR , ((CSSTypedValue ) cssColor ).getPrimitiveType ());
57
+ assertEquals (CSSValue .Type .COLOR , ((CSSTypedValue ) cssColor ).getPrimitiveType ());
58
58
color = AWTHelper .getAWTColor ((CSSTypedValue ) cssColor );
59
59
assertNotNull (color );
60
60
assertEquals (255 , color .getRed ());
Original file line number Diff line number Diff line change @@ -93,8 +93,8 @@ public static Color getAWTColor(CSSTypedValue cssColor) throws CSSPropertyValueE
93
93
Color awtcolor = null ;
94
94
if (cssColor != null ) {
95
95
switch (cssColor .getPrimitiveType ()) {
96
- case RGBCOLOR :
97
- RGBAColor color = cssColor .getRGBColorValue ();
96
+ case COLOR :
97
+ RGBAColor color = cssColor .toRGBColorValue ();
98
98
CSSPrimitiveValue red = color .getRed ();
99
99
CSSPrimitiveValue green = color .getGreen ();
100
100
CSSPrimitiveValue blue = color .getBlue ();
You can’t perform that action at this time.
0 commit comments