deweese 2003/12/17 17:53:49 Modified: sources/org/apache/batik/bridge PaintServer.java Log: 1) No longer throws a Class Cast exception when using named colors as the fallback for icc-colors PR: 25463 Revision Changes Path 1.13 +9 -10 xml-batik/sources/org/apache/batik/bridge/PaintServer.java Index: PaintServer.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/PaintServer.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- PaintServer.java 20 Nov 2003 10:58:49 -0000 1.12 +++ PaintServer.java 18 Dec 2003 01:53:49 -0000 1.13 @@ -287,32 +287,31 @@ throw new Error(); // can't be reached } } else { // List - ListValue lv = (ListValue)paintDef; - Value v = lv.item(0); + Value v = paintDef.item(0); switch (v.getPrimitiveType()) { case CSSPrimitiveValue.CSS_RGBCOLOR: return convertRGBICCColor(paintedElement, v, - (ICCColor)lv.item(1), + (ICCColor)paintDef.item(1), opacity, ctx); case CSSPrimitiveValue.CSS_URI: Paint result = silentConvertURIPaint(paintedElement, paintedNode, - lv, + v, opacity, ctx); if (result == null) { - v = lv.item(1); + v = paintDef.item(1); switch (v.getPrimitiveType()) { case CSSPrimitiveValue.CSS_IDENT: return null; // none case CSSPrimitiveValue.CSS_RGBCOLOR: - if (lv.getLength() == 2) { + if (paintDef.getLength() == 2) { return convertColor(v, opacity); } else { return convertRGBICCColor(paintedElement, v, - (ICCColor)lv.item(2), + (ICCColor)paintDef.item(2), opacity, ctx); } default: @@ -339,13 +338,13 @@ */ public static Paint silentConvertURIPaint(Element paintedElement, GraphicsNode paintedNode, - ListValue paintDef, + Value paintDef, float opacity, BridgeContext ctx) { Paint paint = null; try { paint = convertURIPaint(paintedElement, paintedNode, - paintDef.item(0), opacity, ctx); + paintDef, opacity, ctx); } catch (BridgeException ex) { } return paint;
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]