You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by vh...@apache.org on 2001/02/16 06:14:50 UTC
cvs commit: xml-batik/sources/org/apache/batik/bridge SVGImageElementBridge.java
vhardy 01/02/15 21:14:49
Modified: sources/org/apache/batik/bridge SVGImageElementBridge.java
Log:
Now uses color-profile property instead of attribute (i.e., uses
the CSSStyleDeclaration instead of getAttributeNS).
Revision Changes Path
1.11 +13 -2 xml-batik/sources/org/apache/batik/bridge/SVGImageElementBridge.java
Index: SVGImageElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGImageElementBridge.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- SVGImageElementBridge.java 2001/02/15 02:27:28 1.10
+++ SVGImageElementBridge.java 2001/02/16 05:14:48 1.11
@@ -66,7 +66,7 @@
*
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
* @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
- * @version $Id: SVGImageElementBridge.java,v 1.10 2001/02/15 02:27:28 vhardy Exp $
+ * @version $Id: SVGImageElementBridge.java,v 1.11 2001/02/16 05:14:48 vhardy Exp $
*/
public class SVGImageElementBridge implements GraphicsNodeBridge,
SVGConstants {
@@ -197,9 +197,20 @@
*/
protected ICCColorSpaceExt extractColorSpace(SVGElement svgElement,
BridgeContext ctx){
+ CSSStyleDeclaration cssDecl = CSSUtilities.getComputedStyle(svgElement);
+ CSSPrimitiveValue val
+ = (CSSPrimitiveValue)cssDecl.getPropertyCSSValue(CSS_COLOR_PROFILE_PROPERTY);
+
+ if(val.getPrimitiveType() != CSSPrimitiveValue.CSS_IDENT){
+ throw new Error(); // Should never happen
+ }
+
+
String colorProfileProperty
- = svgElement.getAttributeNS(null, CSS_COLOR_PROFILE_PROPERTY);
+ = val.getStringValue();
+ // System.out.println("color-profile : " + colorProfileProperty);
+ // System.out.println(" attr : " + svgElement.getAttributeNS(null, CSS_COLOR_PROFILE_PROPERTY));
/**
* The only cases that need special handling are
* 'sRGB' and 'name'