View | Details | Raw Unified | Return to bug 27248
Collapse All | Expand All

(-)sources/org/apache/batik/bridge/AbstractGraphicsNodeBridge.java (+3 lines)
Lines 164-169 Link Here
164
        node.setClip(CSSUtilities.convertClipPath(e, node, ctx));
164
        node.setClip(CSSUtilities.convertClipPath(e, node, ctx));
165
        // 'pointer-events'
165
        // 'pointer-events'
166
        node.setPointerEventType(CSSUtilities.convertPointerEvents(e));
166
        node.setPointerEventType(CSSUtilities.convertPointerEvents(e));
167
        // ' rendering-color-space'
168
        node.setColorSpace(CSSUtilities.convertRenderingColorSpace(e, ctx));
167
169
168
        initializeDynamicSupport(ctx, e, node);
170
        initializeDynamicSupport(ctx, e, node);
169
171
Lines 436-439 Link Here
436
        return CSSUtilities.getComputedStyle
438
        return CSSUtilities.getComputedStyle
437
            (e, SVGCSSEngine.FONT_SIZE_INDEX).getFloatValue();
439
            (e, SVGCSSEngine.FONT_SIZE_INDEX).getFloatValue();
438
    }
440
    }
441
439
}
442
}
(-)sources/org/apache/batik/bridge/AbstractSVGFilterPrimitiveElementBridge.java (-6 / +6 lines)
Lines 52-57 Link Here
52
52
53
import java.awt.Color;
53
import java.awt.Color;
54
import java.awt.Paint;
54
import java.awt.Paint;
55
import java.awt.color.ColorSpace;
55
import java.awt.geom.Rectangle2D;
56
import java.awt.geom.Rectangle2D;
56
import java.util.Map;
57
import java.util.Map;
57
58
Lines 167-179 Link Here
167
     * @param filterElement the filter element
168
     * @param filterElement the filter element
168
     */
169
     */
169
    protected static void handleColorInterpolationFilters(Filter filter,
170
    protected static void handleColorInterpolationFilters(Filter filter,
170
                                                          Element filterElement) {
171
                                                          Element filterElement,
172
                                                          BridgeContext ctx) {
171
        if (filter instanceof FilterColorInterpolation) {
173
        if (filter instanceof FilterColorInterpolation) {
172
            boolean isLinear
174
            ColorSpace cs = CSSUtilities.convertColorInterpolationFilters
173
                = CSSUtilities.convertColorInterpolationFilters(filterElement);
175
                (filterElement, ctx);
174
            // System.out.println("IsLinear: " + isLinear +
176
            ((FilterColorInterpolation)filter).setOperationColorSpace(cs);
175
            //                    " Filter: " + filter);
176
            ((FilterColorInterpolation)filter).setColorSpaceLinear(isLinear);
177
        }
177
        }
178
    }
178
    }
179
179
(-)sources/org/apache/batik/bridge/AbstractSVGGradientElementBridge.java (-14 / +20 lines)
Lines 52-57 Link Here
52
52
53
import java.awt.Color;
53
import java.awt.Color;
54
import java.awt.Paint;
54
import java.awt.Paint;
55
import java.awt.color.ColorSpace;
55
import java.awt.geom.AffineTransform;
56
import java.awt.geom.AffineTransform;
56
import java.util.Iterator;
57
import java.util.Iterator;
57
import java.util.LinkedList;
58
import java.util.LinkedList;
Lines 71-77 Link Here
71
 * @author <a href="mailto:tkormann@apache.org">Thierry Kormann</a>
72
 * @author <a href="mailto:tkormann@apache.org">Thierry Kormann</a>
72
 * @version $Id: AbstractSVGGradientElementBridge.java,v 1.11 2003/08/08 11:38:50 vhardy Exp $
73
 * @version $Id: AbstractSVGGradientElementBridge.java,v 1.11 2003/08/08 11:38:50 vhardy Exp $
73
 */
74
 */
74
public abstract class AbstractSVGGradientElementBridge extends AbstractSVGBridge
75
public abstract class AbstractSVGGradientElementBridge 
76
    extends AbstractSVGBridge
75
    implements PaintBridge, ErrorConstants {
77
    implements PaintBridge, ErrorConstants {
76
78
77
    /**
79
    /**
Lines 96-103 Link Here
96
98
97
        String s;
99
        String s;
98
100
99
        // stop elements
101
        // 'color-interpolation' CSS property
100
        List stops = extractStop(paintElement, opacity, ctx);
102
        ColorSpace colorSpace = CSSUtilities.convertColorInterpolation
103
            (paintElement, ctx);
104
105
        // stop elements in 'interpolation space'.
106
        List stops = extractStop(paintElement, opacity, colorSpace, ctx);
107
101
        // if no stops are defined, painting is the same as 'none'
108
        // if no stops are defined, painting is the same as 'none'
102
        if (stops == null) {
109
        if (stops == null) {
103
            return null;
110
            return null;
Lines 125-134 Link Here
125
            spreadMethod = convertSpreadMethod(paintElement, s);
132
            spreadMethod = convertSpreadMethod(paintElement, s);
126
        }
133
        }
127
134
128
        // 'color-interpolation' CSS property
129
        MultipleGradientPaint.ColorSpaceEnum colorSpace
130
            = CSSUtilities.convertColorInterpolation(paintElement);
131
132
        // 'gradientTransform' attribute - default is an Identity matrix
135
        // 'gradientTransform' attribute - default is an Identity matrix
133
        AffineTransform transform;
136
        AffineTransform transform;
134
        s = SVGUtilities.getChainableAttributeNS
137
        s = SVGUtilities.getChainableAttributeNS
Lines 159-165 Link Here
159
     * @param paintedElement the element referencing the paint
162
     * @param paintedElement the element referencing the paint
160
     * @param paintedNode the graphics node on which the Paint will be applied
163
     * @param paintedNode the graphics node on which the Paint will be applied
161
     * @param spreadMethod the spread method
164
     * @param spreadMethod the spread method
162
     * @param colorSpace the color space (sRGB | LinearRGB)
165
     * @param colorSpace the color space of the colors
163
     * @param transform the gradient transform
166
     * @param transform the gradient transform
164
     * @param colors the colors of the gradient
167
     * @param colors the colors of the gradient
165
     * @param offsets the offsets
168
     * @param offsets the offsets
Lines 170-176 Link Here
170
                            Element paintedElement,
173
                            Element paintedElement,
171
                            GraphicsNode paintedNode,
174
                            GraphicsNode paintedNode,
172
                            MultipleGradientPaint.CycleMethodEnum spreadMethod,
175
                            MultipleGradientPaint.CycleMethodEnum spreadMethod,
173
                            MultipleGradientPaint.ColorSpaceEnum colorSpace,
176
                            ColorSpace interpColorSpace,
174
                            AffineTransform transform,
177
                            AffineTransform transform,
175
                            Color [] colors,
178
                            Color [] colors,
176
                            float [] offsets,
179
                            float [] offsets,
Lines 211-221 Link Here
211
     */
214
     */
212
    protected static List extractStop(Element paintElement,
215
    protected static List extractStop(Element paintElement,
213
                                      float opacity,
216
                                      float opacity,
217
                                      ColorSpace colorSpace,
214
                                      BridgeContext ctx) {
218
                                      BridgeContext ctx) {
215
219
216
        List refs = new LinkedList();
220
        List refs = new LinkedList();
217
        for (;;) {
221
        for (;;) {
218
            List stops = extractLocalStop(paintElement, opacity, ctx);
222
            List stops = extractLocalStop
223
                (paintElement, opacity, colorSpace, ctx);
219
            if (stops != null) {
224
            if (stops != null) {
220
                return stops; // stop elements found, exit
225
                return stops; // stop elements found, exit
221
            }
226
            }
Lines 251-256 Link Here
251
     */
256
     */
252
    protected static List extractLocalStop(Element gradientElement,
257
    protected static List extractLocalStop(Element gradientElement,
253
                                           float opacity,
258
                                           float opacity,
259
                                           ColorSpace colorSpace,
254
                                           BridgeContext ctx) {
260
                                           BridgeContext ctx) {
255
        LinkedList stops = null;
261
        LinkedList stops = null;
256
        Stop previous = null;
262
        Stop previous = null;
Lines 268-274 Link Here
268
                continue;
274
                continue;
269
            }
275
            }
270
            Stop stop = ((SVGStopElementBridge)bridge).createStop
276
            Stop stop = ((SVGStopElementBridge)bridge).createStop
271
                (ctx, gradientElement, e, opacity);
277
                (ctx, colorSpace, gradientElement, e, opacity);
272
            if (stops == null) {
278
            if (stops == null) {
273
                stops = new LinkedList();
279
                stops = new LinkedList();
274
            }
280
            }
Lines 342-347 Link Here
342
         * @param opacity an additional opacity of the stop color
348
         * @param opacity an additional opacity of the stop color
343
         */
349
         */
344
        public Stop createStop(BridgeContext ctx,
350
        public Stop createStop(BridgeContext ctx,
351
                               ColorSpace colorSpace,
345
                               Element gradientElement,
352
                               Element gradientElement,
346
                               Element stopElement,
353
                               Element stopElement,
347
                               float opacity) {
354
                               float opacity) {
Lines 359-367 Link Here
359
                    (stopElement, ERR_ATTRIBUTE_VALUE_MALFORMED,
366
                    (stopElement, ERR_ATTRIBUTE_VALUE_MALFORMED,
360
                     new Object[] {SVG_OFFSET_ATTRIBUTE, s, ex});
367
                     new Object[] {SVG_OFFSET_ATTRIBUTE, s, ex});
361
            }
368
            }
362
            Color color
369
            Color color = CSSUtilities.convertStopColor
363
                = CSSUtilities.convertStopColor(stopElement, opacity, ctx);
370
                (stopElement, opacity, colorSpace, ctx);
364
365
            return new Stop(color, offset);
371
            return new Stop(color, offset);
366
        }
372
        }
367
    }
373
    }
(-)sources/org/apache/batik/bridge/CSSUtilities.java (-57 / +141 lines)
Lines 55-60 Link Here
55
import java.awt.Composite;
55
import java.awt.Composite;
56
import java.awt.Cursor;
56
import java.awt.Cursor;
57
import java.awt.RenderingHints;
57
import java.awt.RenderingHints;
58
import java.awt.color.ColorSpace;
59
import java.awt.color.ICC_ColorSpace;
60
import java.awt.color.ICC_Profile;
58
import java.awt.geom.GeneralPath;
61
import java.awt.geom.GeneralPath;
59
import java.awt.geom.Rectangle2D;
62
import java.awt.geom.Rectangle2D;
60
63
Lines 66-77 Link Here
66
import org.apache.batik.css.engine.value.svg.ICCColor;
69
import org.apache.batik.css.engine.value.svg.ICCColor;
67
import org.apache.batik.dom.svg.SVGOMDocument;
70
import org.apache.batik.dom.svg.SVGOMDocument;
68
import org.apache.batik.ext.awt.MultipleGradientPaint;
71
import org.apache.batik.ext.awt.MultipleGradientPaint;
72
import org.apache.batik.ext.awt.color.ICCColorSpaceExt;
69
import org.apache.batik.ext.awt.image.renderable.ClipRable;
73
import org.apache.batik.ext.awt.image.renderable.ClipRable;
70
import org.apache.batik.ext.awt.image.renderable.Filter;
74
import org.apache.batik.ext.awt.image.renderable.Filter;
71
import org.apache.batik.gvt.CompositeGraphicsNode;
75
import org.apache.batik.gvt.CompositeGraphicsNode;
72
import org.apache.batik.gvt.GraphicsNode;
76
import org.apache.batik.gvt.GraphicsNode;
73
import org.apache.batik.gvt.filter.Mask;
77
import org.apache.batik.gvt.filter.Mask;
74
import org.apache.batik.util.CSSConstants;
78
import org.apache.batik.util.CSSConstants;
79
import org.apache.batik.util.SVGConstants;
75
import org.apache.batik.util.XMLConstants;
80
import org.apache.batik.util.XMLConstants;
76
import org.w3c.dom.Element;
81
import org.w3c.dom.Element;
77
import org.w3c.dom.css.CSSPrimitiveValue;
82
import org.w3c.dom.css.CSSPrimitiveValue;
Lines 86-92 Link Here
86
 * @version $Id: CSSUtilities.java,v 1.49 2003/08/09 16:58:37 deweese Exp $
91
 * @version $Id: CSSUtilities.java,v 1.49 2003/08/09 16:58:37 deweese Exp $
87
 */
92
 */
88
public abstract class CSSUtilities
93
public abstract class CSSUtilities
89
    implements CSSConstants, ErrorConstants, XMLConstants {
94
    implements CSSConstants, ErrorConstants, SVGConstants, XMLConstants {
90
95
91
    /**
96
    /**
92
     * No instance of this class is required.
97
     * No instance of this class is required.
Lines 200-240 Link Here
200
    }
205
    }
201
206
202
    /////////////////////////////////////////////////////////////////////////
207
    /////////////////////////////////////////////////////////////////////////
203
    // 'color-interpolation-filters'
204
    /////////////////////////////////////////////////////////////////////////
205
206
    /**
207
     * Returns the color space for the specified filter element. Checks the
208
     * 'color-interpolation-filters' property.
209
     *
210
     * @param e the element
211
     * @return true if the color space is linear, false otherwise (sRGB).
212
     */
213
    public static boolean convertColorInterpolationFilters(Element e) {
214
        Value v = getComputedStyle(e,
215
                             SVGCSSEngine.COLOR_INTERPOLATION_FILTERS_INDEX);
216
        return CSS_LINEARRGB_VALUE == v.getStringValue();
217
    }
218
219
    /////////////////////////////////////////////////////////////////////////
220
    // 'color-interpolation'
221
    /////////////////////////////////////////////////////////////////////////
222
223
    /**
224
     * Returns the color space for the specified element. Checks the
225
     * 'color-interpolation' property
226
     *
227
     * @param e the element
228
     */
229
    public static MultipleGradientPaint.ColorSpaceEnum
230
        convertColorInterpolation(Element e) {
231
        Value v = getComputedStyle(e, SVGCSSEngine.COLOR_INTERPOLATION_INDEX);
232
        return (CSS_LINEARRGB_VALUE == v.getStringValue())
233
            ? MultipleGradientPaint.LINEAR_RGB
234
            : MultipleGradientPaint.SRGB;
235
    }
236
237
    /////////////////////////////////////////////////////////////////////////
238
    // 'cursor'
208
    // 'cursor'
239
    /////////////////////////////////////////////////////////////////////////
209
    /////////////////////////////////////////////////////////////////////////
240
210
Lines 756-769 Link Here
756
     */
726
     */
757
    public static int convertClipRule(Element e) {
727
    public static int convertClipRule(Element e) {
758
        Value v = getComputedStyle(e, SVGCSSEngine.CLIP_RULE_INDEX);
728
        Value v = getComputedStyle(e, SVGCSSEngine.CLIP_RULE_INDEX);
759
        return (v.getStringValue().charAt(0) == 'n')
729
        return ((v.getStringValue().charAt(0) == 'n') ?
760
            ? GeneralPath.WIND_NON_ZERO
730
                GeneralPath.WIND_NON_ZERO             :
761
            : GeneralPath.WIND_EVEN_ODD;
731
                GeneralPath.WIND_EVEN_ODD);
762
    }
732
    }
763
733
764
    /////////////////////////////////////////////////////////////////////////
734
    /*******************************************
765
    // 'mask'
735
     ** 'mask'
766
    /////////////////////////////////////////////////////////////////////////
736
     *******************************************/
767
737
768
    /**
738
    /**
769
     * Returns a <tt>Mask</tt> referenced by the specified element and
739
     * Returns a <tt>Mask</tt> referenced by the specified element and
Lines 814-822 Link Here
814
            : GeneralPath.WIND_EVEN_ODD;
784
            : GeneralPath.WIND_EVEN_ODD;
815
    }
785
    }
816
786
817
    /////////////////////////////////////////////////////////////////////////
787
    /*******************************************
818
    // 'lighting-color'
788
     ** 'lighting-color'
819
    /////////////////////////////////////////////////////////////////////////
789
     *******************************************/
820
790
821
    /**
791
    /**
822
     * Converts the color defined on the specified lighting filter element
792
     * Converts the color defined on the specified lighting filter element
Lines 827-843 Link Here
827
     */
797
     */
828
    public static Color convertLightingColor(Element e, BridgeContext ctx) {
798
    public static Color convertLightingColor(Element e, BridgeContext ctx) {
829
        Value v = getComputedStyle(e, SVGCSSEngine.LIGHTING_COLOR_INDEX);
799
        Value v = getComputedStyle(e, SVGCSSEngine.LIGHTING_COLOR_INDEX);
800
        ColorSpace cs = convertColorInterpolationFilters(e, ctx);
830
        if (v.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
801
        if (v.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
831
            return PaintServer.convertColor(v, 1);
802
            return PaintServer.convertColor(cs, v, 1);
832
        } else {
803
        } else {
833
            return PaintServer.convertRGBICCColor
804
            return PaintServer.convertRGBICCColor
834
                (e, v.item(0), (ICCColor)v.item(1), 1, ctx);
805
                (e, cs, v.item(0), (ICCColor)v.item(1), 1, ctx);
835
        }
806
        }
836
    }
807
    }
837
808
838
    /////////////////////////////////////////////////////////////////////////
809
    /*******************************************
839
    // 'flood-color' and 'flood-opacity'
810
     ** 'flood-color' and 'flood-opacity'
840
    /////////////////////////////////////////////////////////////////////////
811
     *******************************************/
841
812
842
    /**
813
    /**
843
     * Converts the color defined on the specified &lt;feFlood>
814
     * Converts the color defined on the specified &lt;feFlood>
Lines 851-866 Link Here
851
        Value o = getComputedStyle(e, SVGCSSEngine.FLOOD_OPACITY_INDEX);
822
        Value o = getComputedStyle(e, SVGCSSEngine.FLOOD_OPACITY_INDEX);
852
        float f = PaintServer.convertOpacity(o);
823
        float f = PaintServer.convertOpacity(o);
853
        if (v.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
824
        if (v.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
854
            return PaintServer.convertColor(v, f);
825
            return PaintServer.convertColor(null, v, f);
855
        } else {
826
        } else {
856
            return PaintServer.convertRGBICCColor
827
            return PaintServer.convertRGBICCColor
857
                (e, v.item(0), (ICCColor)v.item(1), f, ctx);
828
                (e, null, v.item(0), (ICCColor)v.item(1), f, ctx);
858
        }
829
        }
859
    }
830
    }
860
831
861
    /////////////////////////////////////////////////////////////////////////
832
    /*******************************************
862
    // 'stop-color'
833
     ** 'stop-color'
863
    /////////////////////////////////////////////////////////////////////////
834
     *******************************************/
864
835
865
    /**
836
    /**
866
     * Converts the color defined on the specified &lt;stop> element
837
     * Converts the color defined on the specified &lt;stop> element
Lines 872-889 Link Here
872
     */
843
     */
873
    public static Color convertStopColor(Element e,
844
    public static Color convertStopColor(Element e,
874
                                         float opacity,
845
                                         float opacity,
846
                                             ColorSpace colorSpace,
875
                                         BridgeContext ctx) {
847
                                         BridgeContext ctx) {
876
        Value v = getComputedStyle(e, SVGCSSEngine.STOP_COLOR_INDEX);
848
        Value v = getComputedStyle(e, SVGCSSEngine.STOP_COLOR_INDEX);
877
        Value o = getComputedStyle(e, SVGCSSEngine.STOP_OPACITY_INDEX);
849
        Value o = getComputedStyle(e, SVGCSSEngine.STOP_OPACITY_INDEX);
878
        opacity *= PaintServer.convertOpacity(o);
850
        opacity *= PaintServer.convertOpacity(o);
879
        if (v.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
851
        if (v.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
880
            return PaintServer.convertColor(v, opacity);
852
            return PaintServer.convertColor(colorSpace, v, opacity);
881
        } else {
853
        } else {
882
            return PaintServer.convertRGBICCColor
854
            return PaintServer.convertRGBICCColor
883
                (e, v.item(0), (ICCColor)v.item(1), opacity, ctx);
855
                (e, colorSpace, v.item(0), (ICCColor)v.item(1), opacity, ctx);
884
        }
856
        }
885
    }
857
    }
886
858
859
    
860
861
    /*******************************************
862
     ** 'color-profile'
863
     *******************************************/
864
865
    /**
866
     * Returns the color space for the specified image element. 
867
     * Checks the 'color-profile' property.
868
     *
869
     * @param e the element
870
     * @param ctx the Bridge Contex
871
     * @return true if the color space is linear, false otherwise (sRGB).
872
     */
873
    public static ColorSpace convertColorProfile(Element e, BridgeContext ctx)
874
    {
875
        return extractColorSpace(e, SVGCSSEngine.COLOR_PROFILE_INDEX, ctx);
876
    }
877
878
    /*******************************************
879
     ** 'color-interpolation-filters'
880
     *******************************************/
881
882
    /**
883
     * Returns the color space for the specified filter element. Checks the
884
     * 'color-interpolation-filters' property.
885
     *
886
     * @param e the element
887
     * @return true if the color space is linear, false otherwise (sRGB).
888
     */
889
    public static ColorSpace convertColorInterpolationFilters
890
        (Element e, BridgeContext ctx) {
891
        return extractColorSpace
892
            (e, SVGCSSEngine.COLOR_INTERPOLATION_FILTERS_INDEX, ctx);
893
    }
894
895
    /*******************************************
896
     ** 'color-interpolation'
897
     *******************************************/
898
899
    /**
900
     * Returns the color space for the specified element. Checks the
901
     * 'color-interpolation' property
902
     *
903
     * @param e the element
904
     */
905
    public static ColorSpace convertColorInterpolation
906
        (Element e, BridgeContext ctx) {
907
        return extractColorSpace
908
            (e, SVGCSSEngine.COLOR_INTERPOLATION_INDEX, ctx);
909
    }
910
911
    /*******************************************
912
     ** 'rendering-color-space'
913
     *******************************************/
914
    public static ColorSpace convertRenderingColorSpace
915
        (Element element, BridgeContext ctx) {
916
        return extractColorSpace(element, 
917
                          SVGCSSEngine.RENDERING_COLOR_SPACE_INDEX,
918
                          ctx);
919
    }
920
887
    /////////////////////////////////////////////////////////////////////////
921
    /////////////////////////////////////////////////////////////////////////
888
    // CSS support for <use>
922
    // CSS support for <use>
889
    /////////////////////////////////////////////////////////////////////////
923
    /////////////////////////////////////////////////////////////////////////
Lines 932-935 Link Here
932
            ? GeneralPath.WIND_NON_ZERO
966
            ? GeneralPath.WIND_NON_ZERO
933
            : GeneralPath.WIND_EVEN_ODD;
967
            : GeneralPath.WIND_EVEN_ODD;
934
    }
968
    }
969
970
971
    /**
972
     * Analyzes the color-profile property and builds an ICCColorSpaceExt
973
     * object from it.
974
     *
975
     * @param element the element with the color-profile property
976
     * @param ctx the bridge context
977
     */
978
    protected static ColorSpace extractColorSpace
979
        (Element element, int propertyIndex,
980
         BridgeContext ctx) {
981
982
        String colorProfile = CSSUtilities.getComputedStyle
983
            (element, propertyIndex).getStringValue();
984
985
        // The only cases that need special handling are 'sRGB' 
986
        // 'linearRGB' and 'name'.
987
        ColorSpace colorSpace = null;
988
        if (CSS_SRGB_VALUE.equalsIgnoreCase(colorProfile)) {
989
            colorSpace = iccSRGB;
990
991
        } else if (CSS_LINEARRGB_VALUE.equalsIgnoreCase(colorProfile)) {
992
            colorSpace = iccLinearRGB;
993
        } else if (!CSS_AUTO_VALUE.equalsIgnoreCase(colorProfile)
994
                   && !"".equalsIgnoreCase(colorProfile)){
995
            // The value is neither 'sRGB' nor 'auto': it is a profile name.
996
            SVGColorProfileElementBridge profileBridge =
997
                (SVGColorProfileElementBridge) ctx.getBridge
998
                (SVG_NAMESPACE_URI, SVG_COLOR_PROFILE_TAG);
999
            if (profileBridge != null) {
1000
                colorSpace = profileBridge.createColorSpace
1001
                    (ctx, element, colorProfile);
1002
            }
1003
        }
1004
        return colorSpace;
1005
    }
1006
1007
    final static ColorSpace iccSRGB = 
1008
        ICC_ColorSpace.getInstance(ColorSpace.CS_sRGB);
1009
    // new ICCColorSpaceExt(ICC_Profile.getInstance(ColorSpace.CS_sRGB),
1010
    //                      ICCColorSpaceExt.AUTO);
1011
1012
    final static ColorSpace iccLinearRGB = 
1013
        ICC_ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB);
1014
    // new ICCColorSpaceExt(ICC_Profile.getInstance(ColorSpace.CS_LINEAR_RGB),
1015
    //                      ICCColorSpaceExt.AUTO);
935
}
1016
}
1017
1018
1019
(-)sources/org/apache/batik/bridge/PaintServer.java (-14 / +38 lines)
Lines 55-60 Link Here
55
import java.awt.Paint;
55
import java.awt.Paint;
56
import java.awt.Shape;
56
import java.awt.Shape;
57
import java.awt.Stroke;
57
import java.awt.Stroke;
58
import java.awt.color.ColorSpace;
58
59
59
import org.apache.batik.css.engine.SVGCSSEngine;
60
import org.apache.batik.css.engine.SVGCSSEngine;
60
import org.apache.batik.css.engine.value.ListValue;
61
import org.apache.batik.css.engine.value.ListValue;
Lines 268-280 Link Here
268
                                        Value paintDef,
269
                                        Value paintDef,
269
                                        float opacity,
270
                                        float opacity,
270
                                        BridgeContext ctx) {
271
                                        BridgeContext ctx) {
272
271
        if (paintDef.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
273
        if (paintDef.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
272
            switch (paintDef.getPrimitiveType()) {
274
            switch (paintDef.getPrimitiveType()) {
273
            case CSSPrimitiveValue.CSS_IDENT:
275
            case CSSPrimitiveValue.CSS_IDENT:
274
                return null; // none
276
                return null; // none
275
277
276
            case CSSPrimitiveValue.CSS_RGBCOLOR:
278
            case CSSPrimitiveValue.CSS_RGBCOLOR:
277
                return convertColor(paintDef, opacity);
279
                return convertColor(paintedNode.getColorSpace(), 
280
                                    paintDef, opacity);
278
281
279
            case CSSPrimitiveValue.CSS_URI:
282
            case CSSPrimitiveValue.CSS_URI:
280
                return convertURIPaint(paintedElement,
283
                return convertURIPaint(paintedElement,
Lines 290-298 Link Here
290
            Value v = paintDef.item(0);
293
            Value v = paintDef.item(0);
291
            switch (v.getPrimitiveType()) {
294
            switch (v.getPrimitiveType()) {
292
            case CSSPrimitiveValue.CSS_RGBCOLOR:
295
            case CSSPrimitiveValue.CSS_RGBCOLOR:
293
                return convertRGBICCColor(paintedElement, v,
296
                return convertRGBICCColor
294
                                          (ICCColor)paintDef.item(1),
297
                    (paintedElement, paintedNode.getColorSpace(), v,
295
                                          opacity, ctx);
298
                     (ICCColor)paintDef.item(1), opacity, ctx);
296
299
297
            case CSSPrimitiveValue.CSS_URI:
300
            case CSSPrimitiveValue.CSS_URI:
298
                Paint result = silentConvertURIPaint(paintedElement,
301
                Paint result = silentConvertURIPaint(paintedElement,
Lines 308-318 Link Here
308
311
309
                    case CSSPrimitiveValue.CSS_RGBCOLOR:
312
                    case CSSPrimitiveValue.CSS_RGBCOLOR:
310
                        if (paintDef.getLength() == 2) {
313
                        if (paintDef.getLength() == 2) {
311
                            return convertColor(v, opacity);
314
                            return convertColor(paintedNode.getColorSpace(), 
315
                                                v, opacity);
312
                        } else {
316
                        } else {
313
                            return convertRGBICCColor(paintedElement, v,
317
                            return convertRGBICCColor
314
                                                      (ICCColor)paintDef.item(2),
318
                                (paintedElement, paintedNode.getColorSpace(), 
315
                                                      opacity, ctx);
319
                                 v, (ICCColor)paintDef.item(2), opacity, ctx);
316
                        }
320
                        }
317
                    default:
321
                    default:
318
                        throw new Error(); // can't be reached
322
                        throw new Error(); // can't be reached
Lines 392-407 Link Here
392
     * @param ctx the bridge context to use
396
     * @param ctx the bridge context to use
393
     */
397
     */
394
    public static Color convertRGBICCColor(Element paintedElement,
398
    public static Color convertRGBICCColor(Element paintedElement,
399
                                           ColorSpace colorSpace,
395
                                           Value colorDef,
400
                                           Value colorDef,
396
                                           ICCColor iccColor,
401
                                           ICCColor iccColor,
397
                                           float opacity,
402
                                           float opacity,
398
                                           BridgeContext ctx) {
403
                                           BridgeContext ctx) {
399
        Color color = null;
404
        Color color = null;
400
        if (iccColor != null){
405
        if (iccColor != null){
401
            color = convertICCColor(paintedElement, iccColor, opacity, ctx);
406
            color = convertICCColor(paintedElement, colorSpace, 
407
                                    iccColor, opacity, ctx);
402
        }
408
        }
403
        if (color == null){
409
        if (color == null){
404
            color = convertColor(colorDef, opacity);
410
            color = convertColor(colorSpace, colorDef, opacity);
405
        }
411
        }
406
        return color;
412
        return color;
407
    }
413
    }
Lines 417-422 Link Here
417
     * @param ctx the bridge context to use
423
     * @param ctx the bridge context to use
418
     */
424
     */
419
    public static Color convertICCColor(Element e,
425
    public static Color convertICCColor(Element e,
426
                                        ColorSpace colorSpace,
420
                                        ICCColor c,
427
                                        ICCColor c,
421
                                        float opacity,
428
                                        float opacity,
422
                                        BridgeContext ctx){
429
                                        BridgeContext ctx){
Lines 433-440 Link Here
433
            return null; // no bridge for color profile
440
            return null; // no bridge for color profile
434
        }
441
        }
435
442
436
        ICCColorSpaceExt profileCS
443
        ColorSpace profileCS= profileBridge.createColorSpace
437
            = profileBridge.createICCColorSpaceExt(ctx, e, iccProfileName);
444
            (ctx, e, iccProfileName);
438
        if (profileCS == null){
445
        if (profileCS == null){
439
            return null; // no profile
446
            return null; // no profile
440
        }
447
        }
Lines 450-456 Link Here
450
        }
457
        }
451
458
452
        // Convert values to RGB
459
        // Convert values to RGB
453
        float[] rgb = profileCS.intendedToRGB(colorValue);
460
        float[] rgb;
461
        if (profileCS instanceof ICCColorSpaceExt) {
462
            rgb = ((ICCColorSpaceExt)profileCS).intendedToRGB(colorValue);
463
        } else {
464
            rgb = profileCS.toRGB(colorValue);
465
        }
466
        if (colorSpace != null) {
467
            rgb = colorSpace.fromRGB(rgb);
468
        }
469
454
        return new Color(rgb[0], rgb[1], rgb[2], opacity);
470
        return new Color(rgb[0], rgb[1], rgb[2], opacity);
455
    }
471
    }
456
472
Lines 459-468 Link Here
459
     * @param c The CSS color to convert.
475
     * @param c The CSS color to convert.
460
     * @param o The opacity value (0 <= o <= 1).
476
     * @param o The opacity value (0 <= o <= 1).
461
     */
477
     */
462
    public static Color convertColor(Value c, float opacity) {
478
    public static Color convertColor(ColorSpace cs, Value c, float opacity) {
463
        int r = resolveColorComponent(c.getRed());
479
        int r = resolveColorComponent(c.getRed());
464
        int g = resolveColorComponent(c.getGreen());
480
        int g = resolveColorComponent(c.getGreen());
465
        int b = resolveColorComponent(c.getBlue());
481
        int b = resolveColorComponent(c.getBlue());
482
483
        if (cs != null) {
484
            float [] rgb = {r/255f, g/255f, b/255f };
485
            float [] abc = cs.fromRGB(rgb);
486
            r = (int)(abc[0]*255);
487
            g = (int)(abc[1]*255);
488
            b = (int)(abc[2]*255);
489
        }
466
        return new Color(r, g, b, Math.round(opacity * 255f));
490
        return new Color(r, g, b, Math.round(opacity * 255f));
467
    }
491
    }
468
492
(-)sources/org/apache/batik/bridge/SVGColorProfileElementBridge.java (-2 / +7 lines)
Lines 50-55 Link Here
50
50
51
package org.apache.batik.bridge;
51
package org.apache.batik.bridge;
52
52
53
import java.awt.color.ColorSpace;
54
import java.awt.color.ICC_ColorSpace;
53
import java.awt.color.ICC_Profile;
55
import java.awt.color.ICC_Profile;
54
import java.io.IOException;
56
import java.io.IOException;
55
57
Lines 93-103 Link Here
93
     *        that could be a color-profile element or an @color-profile
95
     *        that could be a color-profile element or an @color-profile
94
     *        CSS rule
96
     *        CSS rule
95
     */
97
     */
96
    public ICCColorSpaceExt createICCColorSpaceExt(BridgeContext ctx,
98
    public ColorSpace createColorSpace(BridgeContext ctx,
97
                                                   Element paintedElement,
99
                                                   Element paintedElement,
98
                                                   String iccProfileName) {
100
                                                   String iccProfileName) {
99
        // Check if there is one if the cache.
101
        // Check if there is one if the cache.
100
        ICCColorSpaceExt cs = cache.request(iccProfileName.toLowerCase());
102
        ColorSpace cs = cache.request(iccProfileName.toLowerCase());
101
        if (cs != null){
103
        if (cs != null){
102
            return cs;
104
            return cs;
103
        }
105
        }
Lines 161-166 Link Here
161
163
162
        // Extract the rendering intent from profile element
164
        // Extract the rendering intent from profile element
163
        int intent = convertIntent(profile);
165
        int intent = convertIntent(profile);
166
        if (intent == ICCColorSpaceExt.AUTO) 
167
            cs = new ICC_ColorSpace(p);
168
        else
164
        cs = new ICCColorSpaceExt(p, intent);
169
        cs = new ICCColorSpaceExt(p, intent);
165
170
166
        // Add profile to cache
171
        // Add profile to cache
(-)sources/org/apache/batik/bridge/SVGFeBlendElementBridge.java (-2 / +2 lines)
Lines 155-163 Link Here
155
        srcs.add(in2);
155
        srcs.add(in2);
156
        srcs.add(in);
156
        srcs.add(in);
157
157
158
        Filter filter = new CompositeRable8Bit(srcs, rule, true);
158
        Filter filter = new CompositeRable8Bit(srcs, rule);
159
        // handle the 'color-interpolation-filters' property
159
        // handle the 'color-interpolation-filters' property
160
        handleColorInterpolationFilters(filter, filterElement);
160
        handleColorInterpolationFilters(filter, filterElement, ctx);
161
161
162
        filter = new PadRable8Bit(filter, primitiveRegion, PadMode.ZERO_PAD);
162
        filter = new PadRable8Bit(filter, primitiveRegion, PadMode.ZERO_PAD);
163
163
(-)sources/org/apache/batik/bridge/SVGFeColorMatrixElementBridge.java (-1 / +1 lines)
Lines 156-162 Link Here
156
        colorMatrix.setSource(in);
156
        colorMatrix.setSource(in);
157
157
158
        // handle the 'color-interpolation-filters' property
158
        // handle the 'color-interpolation-filters' property
159
        handleColorInterpolationFilters(colorMatrix, filterElement);
159
        handleColorInterpolationFilters(colorMatrix, filterElement, ctx);
160
160
161
        Filter filter
161
        Filter filter
162
            = new PadRable8Bit(colorMatrix, primitiveRegion, PadMode.ZERO_PAD);
162
            = new PadRable8Bit(colorMatrix, primitiveRegion, PadMode.ZERO_PAD);
(-)sources/org/apache/batik/bridge/SVGFeComponentTransferElementBridge.java (-1 / +1 lines)
Lines 174-180 Link Here
174
            (in, funcA, funcR, funcG, funcB);
174
            (in, funcA, funcR, funcG, funcB);
175
175
176
        // handle the 'color-interpolation-filters' property
176
        // handle the 'color-interpolation-filters' property
177
        handleColorInterpolationFilters(filter, filterElement);
177
        handleColorInterpolationFilters(filter, filterElement, ctx);
178
178
179
        filter = new PadRable8Bit(filter, primitiveRegion, PadMode.ZERO_PAD);
179
        filter = new PadRable8Bit(filter, primitiveRegion, PadMode.ZERO_PAD);
180
180
(-)sources/org/apache/batik/bridge/SVGFeCompositeElementBridge.java (-2 / +2 lines)
Lines 152-161 Link Here
152
        List srcs = new ArrayList(2);
152
        List srcs = new ArrayList(2);
153
        srcs.add(in2);
153
        srcs.add(in2);
154
        srcs.add(in);
154
        srcs.add(in);
155
        Filter filter = new CompositeRable8Bit(srcs, rule, true);
155
        Filter filter = new CompositeRable8Bit(srcs, rule);
156
156
157
        // handle the 'color-interpolation-filters' property
157
        // handle the 'color-interpolation-filters' property
158
        handleColorInterpolationFilters(filter, filterElement);
158
        handleColorInterpolationFilters(filter, filterElement, ctx);
159
159
160
        filter = new PadRable8Bit(filter, primitiveRegion, PadMode.ZERO_PAD);
160
        filter = new PadRable8Bit(filter, primitiveRegion, PadMode.ZERO_PAD);
161
161
(-)sources/org/apache/batik/bridge/SVGFeConvolveMatrixElementBridge.java (-1 / +1 lines)
Lines 175-181 Link Here
175
        convolve.setPreserveAlpha(preserveAlpha);
175
        convolve.setPreserveAlpha(preserveAlpha);
176
176
177
        // handle the 'color-interpolation-filters' property
177
        // handle the 'color-interpolation-filters' property
178
        handleColorInterpolationFilters(convolve, filterElement);
178
        handleColorInterpolationFilters(convolve, filterElement, ctx);
179
179
180
        PadRable filter = new PadRable8Bit
180
        PadRable filter = new PadRable8Bit
181
            (convolve, primitiveRegion, PadMode.ZERO_PAD);
181
            (convolve, primitiveRegion, PadMode.ZERO_PAD);
(-)sources/org/apache/batik/bridge/SVGFeDiffuseLightingElementBridge.java (-1 / +1 lines)
Lines 154-160 Link Here
154
                                                     kernelUnitLength);
154
                                                     kernelUnitLength);
155
155
156
        // handle the 'color-interpolation-filters' property
156
        // handle the 'color-interpolation-filters' property
157
        handleColorInterpolationFilters(filter, filterElement);
157
        handleColorInterpolationFilters(filter, filterElement, ctx);
158
158
159
        // update the filter Map
159
        // update the filter Map
160
        updateFilterMap(filterElement, filter, filterMap);
160
        updateFilterMap(filterElement, filter, filterMap);
(-)sources/org/apache/batik/bridge/SVGFeDisplacementMapElementBridge.java (-1 / +1 lines)
Lines 168-174 Link Here
168
            (srcs, scale, xChannelSelector, yChannelSelector);
168
            (srcs, scale, xChannelSelector, yChannelSelector);
169
169
170
        // handle the 'color-interpolation-filters' property
170
        // handle the 'color-interpolation-filters' property
171
        handleColorInterpolationFilters(displacementMap, filterElement);
171
        handleColorInterpolationFilters(displacementMap, filterElement, ctx);
172
172
173
        PadRable filter = new PadRable8Bit
173
        PadRable filter = new PadRable8Bit
174
            (displacementMap, primitiveRegion, PadMode.ZERO_PAD);
174
            (displacementMap, primitiveRegion, PadMode.ZERO_PAD);
(-)sources/org/apache/batik/bridge/SVGFeFloodElementBridge.java (-1 / +1 lines)
Lines 119-125 Link Here
119
        Filter filter = new FloodRable8Bit(primitiveRegion, color);
119
        Filter filter = new FloodRable8Bit(primitiveRegion, color);
120
120
121
        // handle the 'color-interpolation-filters' property
121
        // handle the 'color-interpolation-filters' property
122
        handleColorInterpolationFilters(filter, filterElement);
122
        handleColorInterpolationFilters(filter, filterElement, ctx);
123
123
124
        // update the filter Map
124
        // update the filter Map
125
        updateFilterMap(filterElement, filter, filterMap);
125
        updateFilterMap(filterElement, filter, filterMap);
(-)sources/org/apache/batik/bridge/SVGFeGaussianBlurElementBridge.java (-1 / +1 lines)
Lines 152-158 Link Here
152
            (pad, stdDeviationXY[0], stdDeviationXY[1]);
152
            (pad, stdDeviationXY[0], stdDeviationXY[1]);
153
153
154
        // handle the 'color-interpolation-filters' property
154
        // handle the 'color-interpolation-filters' property
155
        handleColorInterpolationFilters(blur, filterElement);
155
        handleColorInterpolationFilters(blur, filterElement, ctx);
156
156
157
        PadRable filter
157
        PadRable filter
158
            = new PadRable8Bit(blur, primitiveRegion, PadMode.ZERO_PAD);
158
            = new PadRable8Bit(blur, primitiveRegion, PadMode.ZERO_PAD);
(-)sources/org/apache/batik/bridge/SVGFeImageElementBridge.java (-1 / +1 lines)
Lines 215-221 Link Here
215
        filter = new AffineRable8Bit(filter, at);
215
        filter = new AffineRable8Bit(filter, at);
216
216
217
        // handle the 'color-interpolation-filters' property
217
        // handle the 'color-interpolation-filters' property
218
        handleColorInterpolationFilters(filter, filterElement);
218
        handleColorInterpolationFilters(filter, filterElement, ctx);
219
219
220
        filter = new PadRable8Bit(filter, primitiveRegionUserSpace, PadMode.ZERO_PAD);
220
        filter = new PadRable8Bit(filter, primitiveRegionUserSpace, PadMode.ZERO_PAD);
221
221
(-)sources/org/apache/batik/bridge/SVGFeMergeElementBridge.java (-2 / +2 lines)
Lines 144-153 Link Here
144
                                                        filterRegion,
144
                                                        filterRegion,
145
                                                        ctx);
145
                                                        ctx);
146
146
147
        Filter filter = new CompositeRable8Bit(srcs, CompositeRule.OVER, true);
147
        Filter filter = new CompositeRable8Bit(srcs, CompositeRule.OVER);
148
148
149
        // handle the 'color-interpolation-filters' property
149
        // handle the 'color-interpolation-filters' property
150
        handleColorInterpolationFilters(filter, filterElement);
150
        handleColorInterpolationFilters(filter, filterElement, ctx);
151
151
152
        filter = new PadRable8Bit(filter, primitiveRegion, PadMode.ZERO_PAD);
152
        filter = new PadRable8Bit(filter, primitiveRegion, PadMode.ZERO_PAD);
153
153
(-)sources/org/apache/batik/bridge/SVGFeMorphologyElementBridge.java (-1 / +1 lines)
Lines 151-157 Link Here
151
            = new MorphologyRable8Bit(pad, radii[0], radii[1], isDilate);
151
            = new MorphologyRable8Bit(pad, radii[0], radii[1], isDilate);
152
152
153
        // handle the 'color-interpolation-filters' property
153
        // handle the 'color-interpolation-filters' property
154
        handleColorInterpolationFilters(morphology, filterElement);
154
        handleColorInterpolationFilters(morphology, filterElement, ctx);
155
155
156
        PadRable filter = new PadRable8Bit
156
        PadRable filter = new PadRable8Bit
157
            (morphology, primitiveRegion, PadMode.ZERO_PAD);
157
            (morphology, primitiveRegion, PadMode.ZERO_PAD);
(-)sources/org/apache/batik/bridge/SVGFeOffsetElementBridge.java (-1 / +1 lines)
Lines 145-151 Link Here
145
        filter = new PadRable8Bit(filter, primitiveRegion, PadMode.ZERO_PAD);
145
        filter = new PadRable8Bit(filter, primitiveRegion, PadMode.ZERO_PAD);
146
146
147
        // handle the 'color-interpolation-filters' property
147
        // handle the 'color-interpolation-filters' property
148
        handleColorInterpolationFilters(filter, filterElement);
148
        handleColorInterpolationFilters(filter, filterElement, ctx);
149
149
150
        // update the filter Map
150
        // update the filter Map
151
        updateFilterMap(filterElement, filter, filterMap);
151
        updateFilterMap(filterElement, filter, filterMap);
(-)sources/org/apache/batik/bridge/SVGFeSpecularLightingElementBridge.java (-1 / +1 lines)
Lines 158-164 Link Here
158
158
159
159
160
        // handle the 'color-interpolation-filters' property
160
        // handle the 'color-interpolation-filters' property
161
        handleColorInterpolationFilters(filter, filterElement);
161
        handleColorInterpolationFilters(filter, filterElement, ctx);
162
162
163
        // update the filter Map
163
        // update the filter Map
164
        updateFilterMap(filterElement, filter, filterMap);
164
        updateFilterMap(filterElement, filter, filterMap);
(-)sources/org/apache/batik/bridge/SVGFeTileElementBridge.java (-1 / +1 lines)
Lines 133-139 Link Here
133
            = new TileRable8Bit(in, primitiveRegion, in.getBounds2D(), false);
133
            = new TileRable8Bit(in, primitiveRegion, in.getBounds2D(), false);
134
134
135
        // handle the 'color-interpolation-filters' property
135
        // handle the 'color-interpolation-filters' property
136
        handleColorInterpolationFilters(filter, filterElement);
136
        handleColorInterpolationFilters(filter, filterElement, ctx);
137
137
138
        // update the filter Map
138
        // update the filter Map
139
        updateFilterMap(filterElement, filter, filterMap);
139
        updateFilterMap(filterElement, filter, filterMap);
(-)sources/org/apache/batik/bridge/SVGFeTurbulenceElementBridge.java (-1 / +1 lines)
Lines 160-166 Link Here
160
        turbulenceRable.setFractalNoise(isFractalNoise);
160
        turbulenceRable.setFractalNoise(isFractalNoise);
161
161
162
        // handle the 'color-interpolation-filters' property
162
        // handle the 'color-interpolation-filters' property
163
        handleColorInterpolationFilters(turbulenceRable, filterElement);
163
        handleColorInterpolationFilters(turbulenceRable, filterElement, ctx);
164
164
165
        // update the filter Map
165
        // update the filter Map
166
        updateFilterMap(filterElement, turbulenceRable, filterMap);
166
        updateFilterMap(filterElement, turbulenceRable, filterMap);
(-)sources/org/apache/batik/bridge/SVGImageElementBridge.java (-39 / +2 lines)
Lines 54-59 Link Here
54
import java.awt.Shape;
54
import java.awt.Shape;
55
import java.awt.color.ColorSpace;
55
import java.awt.color.ColorSpace;
56
import java.awt.color.ICC_Profile;
56
import java.awt.color.ICC_Profile;
57
import java.awt.color.ICC_ColorSpace;
57
import java.awt.geom.AffineTransform;
58
import java.awt.geom.AffineTransform;
58
import java.awt.geom.Rectangle2D;
59
import java.awt.geom.Rectangle2D;
59
import java.io.BufferedInputStream;
60
import java.io.BufferedInputStream;
Lines 67-73 Link Here
67
import org.apache.batik.dom.svg.SVGOMElement;
68
import org.apache.batik.dom.svg.SVGOMElement;
68
import org.apache.batik.dom.svg.XMLBaseSupport;
69
import org.apache.batik.dom.svg.XMLBaseSupport;
69
import org.apache.batik.dom.util.XLinkSupport;
70
import org.apache.batik.dom.util.XLinkSupport;
70
import org.apache.batik.ext.awt.color.ICCColorSpaceExt;
71
import org.apache.batik.ext.awt.image.renderable.ClipRable8Bit;
71
import org.apache.batik.ext.awt.image.renderable.ClipRable8Bit;
72
import org.apache.batik.ext.awt.image.renderable.Filter;
72
import org.apache.batik.ext.awt.image.renderable.Filter;
73
import org.apache.batik.ext.awt.image.spi.ImageTagRegistry;
73
import org.apache.batik.ext.awt.image.spi.ImageTagRegistry;
Lines 220-226 Link Here
220
220
221
        DocumentLoader loader = ctx.getDocumentLoader();
221
        DocumentLoader loader = ctx.getDocumentLoader();
222
        ImageTagRegistry reg = ImageTagRegistry.getRegistry();
222
        ImageTagRegistry reg = ImageTagRegistry.getRegistry();
223
        ICCColorSpaceExt colorspace = extractColorSpace(e, ctx);
223
        ColorSpace colorspace = CSSUtilities.convertColorProfile(e, ctx);
224
        {
224
        {
225
            /**
225
            /**
226
             *  Before we open the URL we see if we have the
226
             *  Before we open the URL we see if we have the
Lines 781-823 Link Here
781
                node.setClip(new ClipRable8Bit(filter, clip));
781
                node.setClip(new ClipRable8Bit(filter, clip));
782
            } catch (java.awt.geom.NoninvertibleTransformException ex) {}
782
            } catch (java.awt.geom.NoninvertibleTransformException ex) {}
783
        }
783
        }
784
    }
785
786
    /**
787
     * Analyzes the color-profile property and builds an ICCColorSpaceExt
788
     * object from it.
789
     *
790
     * @param element the element with the color-profile property
791
     * @param ctx the bridge context
792
     */
793
    protected static ICCColorSpaceExt extractColorSpace(Element element,
794
                                                        BridgeContext ctx) {
795
796
        String colorProfileProperty = CSSUtilities.getComputedStyle
797
            (element, SVGCSSEngine.COLOR_PROFILE_INDEX).getStringValue();
798
799
        // The only cases that need special handling are 'sRGB' and 'name'
800
        ICCColorSpaceExt colorSpace = null;
801
        if (CSS_SRGB_VALUE.equalsIgnoreCase(colorProfileProperty)) {
802
803
            colorSpace = new ICCColorSpaceExt
804
                (ICC_Profile.getInstance(ColorSpace.CS_sRGB),
805
                 ICCColorSpaceExt.AUTO);
806
807
        } else if (!CSS_AUTO_VALUE.equalsIgnoreCase(colorProfileProperty)
808
                   && !"".equalsIgnoreCase(colorProfileProperty)){
809
810
            // The value is neither 'sRGB' nor 'auto': it is a profile name.
811
            SVGColorProfileElementBridge profileBridge =
812
                (SVGColorProfileElementBridge) ctx.getBridge
813
                (SVG_NAMESPACE_URI, SVG_COLOR_PROFILE_TAG);
814
            if (profileBridge != null) {
815
                colorSpace = profileBridge.createICCColorSpaceExt
816
                    (ctx, element, colorProfileProperty);
817
818
            }
819
        }
820
        return colorSpace;
821
    }
784
    }
822
785
823
    /**
786
    /**
(-)sources/org/apache/batik/bridge/SVGLinearGradientElementBridge.java (-3 / +5 lines)
Lines 52-57 Link Here
52
52
53
import java.awt.Color;
53
import java.awt.Color;
54
import java.awt.Paint;
54
import java.awt.Paint;
55
import java.awt.color.ColorSpace;
55
import java.awt.geom.AffineTransform;
56
import java.awt.geom.AffineTransform;
56
import java.awt.geom.Point2D;
57
import java.awt.geom.Point2D;
57
58
Lines 88-94 Link Here
88
     * @param paintedElement the element referencing the paint
89
     * @param paintedElement the element referencing the paint
89
     * @param paintedNode the graphics node on which the Paint will be applied
90
     * @param paintedNode the graphics node on which the Paint will be applied
90
     * @param spreadMethod the spread method
91
     * @param spreadMethod the spread method
91
     * @param colorSpace the color space (sRGB | LinearRGB)
92
     * @param interpColorSpace the interpolation color space
92
     * @param transform the gradient transform
93
     * @param transform the gradient transform
93
     * @param colors the colors of the gradient
94
     * @param colors the colors of the gradient
94
     * @param offsets the offsets
95
     * @param offsets the offsets
Lines 99-105 Link Here
99
                            Element paintedElement,
100
                            Element paintedElement,
100
                            GraphicsNode paintedNode,
101
                            GraphicsNode paintedNode,
101
                            MultipleGradientPaint.CycleMethodEnum spreadMethod,
102
                            MultipleGradientPaint.CycleMethodEnum spreadMethod,
102
                            MultipleGradientPaint.ColorSpaceEnum colorSpace,
103
                            ColorSpace interpColorSpace,
103
                            AffineTransform transform,
104
                            AffineTransform transform,
104
                            Color [] colors,
105
                            Color [] colors,
105
                            float [] offsets,
106
                            float [] offsets,
Lines 176-182 Link Here
176
					   offsets,
177
					   offsets,
177
					   colors,
178
					   colors,
178
					   spreadMethod,
179
					   spreadMethod,
179
					   colorSpace,
180
                                           interpColorSpace,
181
					   paintedNode.getColorSpace(),
180
					   transform);
182
					   transform);
181
	}
183
	}
182
    }
184
    }
(-)sources/org/apache/batik/bridge/SVGPatternElementBridge.java (-1 / +3 lines)
Lines 113-119 Link Here
113
            return null; // no content means no paint
113
            return null; // no content means no paint
114
        }
114
        }
115
115
116
        // get pattern region using 'patternUnits'. Pattern region is in tile pace.
116
        // get pattern region using 'patternUnits'. Pattern region is
117
        // in tile space.
117
        Rectangle2D patternRegion = SVGUtilities.convertPatternRegion
118
        Rectangle2D patternRegion = SVGUtilities.convertPatternRegion
118
            (patternElement, paintedElement, paintedNode, ctx);
119
            (patternElement, paintedElement, paintedNode, ctx);
119
120
Lines 239-244 Link Here
239
240
240
        return new PatternPaint(patternContentNode,
241
        return new PatternPaint(patternContentNode,
241
                                patternRegion,
242
                                patternRegion,
243
                                paintedNode.getColorSpace(),
242
                                !overflowIsHidden,
244
                                !overflowIsHidden,
243
                                patternTransform);
245
                                patternTransform);
244
246
(-)sources/org/apache/batik/bridge/SVGRadialGradientElementBridge.java (-3 / +4 lines)
Lines 52-57 Link Here
52
52
53
import java.awt.Color;
53
import java.awt.Color;
54
import java.awt.Paint;
54
import java.awt.Paint;
55
import java.awt.color.ColorSpace;
55
import java.awt.geom.AffineTransform;
56
import java.awt.geom.AffineTransform;
56
import java.awt.geom.Point2D;
57
import java.awt.geom.Point2D;
57
58
Lines 89-95 Link Here
89
     * @param paintedElement the element referencing the paint
90
     * @param paintedElement the element referencing the paint
90
     * @param paintedNode the graphics node on which the Paint will be applied
91
     * @param paintedNode the graphics node on which the Paint will be applied
91
     * @param spreadMethod the spread method
92
     * @param spreadMethod the spread method
92
     * @param colorSpace the color space (sRGB | LinearRGB)
93
     * @param transform the gradient transform
93
     * @param transform the gradient transform
94
     * @param colors the colors of the gradient
94
     * @param colors the colors of the gradient
95
     * @param offsets the offsets
95
     * @param offsets the offsets
Lines 100-106 Link Here
100
                            Element paintedElement,
100
                            Element paintedElement,
101
                            GraphicsNode paintedNode,
101
                            GraphicsNode paintedNode,
102
                            MultipleGradientPaint.CycleMethodEnum spreadMethod,
102
                            MultipleGradientPaint.CycleMethodEnum spreadMethod,
103
                            MultipleGradientPaint.ColorSpaceEnum colorSpace,
103
                            ColorSpace interpColorSpace,
104
                            AffineTransform transform,
104
                            AffineTransform transform,
105
                            Color [] colors,
105
                            Color [] colors,
106
                            float [] offsets,
106
                            float [] offsets,
Lines 190-196 Link Here
190
                                           offsets,
190
                                           offsets,
191
                                           colors,
191
                                           colors,
192
                                           spreadMethod,
192
                                           spreadMethod,
193
                                           RadialGradientPaint.SRGB,
193
                                           interpColorSpace,
194
                                           paintedNode.getColorSpace(),
194
                                           transform);
195
                                           transform);
195
        }
196
        }
196
    }
197
    }
(-)sources/org/apache/batik/bridge/SVGSVGElementBridge.java (+2 lines)
Lines 250-255 Link Here
250
        node.setMask(CSSUtilities.convertMask(e, node, ctx));
250
        node.setMask(CSSUtilities.convertMask(e, node, ctx));
251
        // 'pointer-events'
251
        // 'pointer-events'
252
        node.setPointerEventType(CSSUtilities.convertPointerEvents(e));
252
        node.setPointerEventType(CSSUtilities.convertPointerEvents(e));
253
        // ' rendering-color-space'
254
        node.setColorSpace(CSSUtilities.convertRenderingColorSpace(e, ctx));
253
255
254
        initializeDynamicSupport(ctx, e, node);
256
        initializeDynamicSupport(ctx, e, node);
255
257
(-)sources/org/apache/batik/bridge/SVGShapeElementBridge.java (-1 / +1 lines)
Lines 115-123 Link Here
115
    public void buildGraphicsNode(BridgeContext ctx,
115
    public void buildGraphicsNode(BridgeContext ctx,
116
                                  Element e,
116
                                  Element e,
117
                                  GraphicsNode node) {
117
                                  GraphicsNode node) {
118
        super.buildGraphicsNode(ctx, e, node);
118
        ShapeNode shapeNode = (ShapeNode)node;
119
        ShapeNode shapeNode = (ShapeNode)node;
119
        shapeNode.setShapePainter(createShapePainter(ctx, e, shapeNode));
120
        shapeNode.setShapePainter(createShapePainter(ctx, e, shapeNode));
120
        super.buildGraphicsNode(ctx, e, node);
121
    }
121
    }
122
122
123
    /**
123
    /**
(-)sources/org/apache/batik/bridge/SVGSwitchElementBridge.java (-1 / +16 lines)
Lines 126-132 Link Here
126
    public void buildGraphicsNode(BridgeContext ctx,
126
    public void buildGraphicsNode(BridgeContext ctx,
127
                                  Element e,
127
                                  Element e,
128
                                  GraphicsNode node) {
128
                                  GraphicsNode node) {
129
        // bind the specified element and its associated graphics node if needed
129
130
        // 'opacity'
131
        node.setComposite(CSSUtilities.convertOpacity(e));
132
        // 'filter'
133
        node.setFilter(CSSUtilities.convertFilter(e, node, ctx));
134
        // 'mask'
135
        node.setMask(CSSUtilities.convertMask(e, node, ctx));
136
        // 'clip-path'
137
        node.setClip(CSSUtilities.convertClipPath(e, node, ctx));
138
        // 'pointer-events'
139
        node.setPointerEventType(CSSUtilities.convertPointerEvents(e));
140
        // ' rendering-color-space'
141
        node.setColorSpace(CSSUtilities.convertRenderingColorSpace(e, ctx));
142
143
        // bind the specified element and its associated graphics node
144
        // if needed
130
        if (ctx.isInteractive()) {
145
        if (ctx.isInteractive()) {
131
            ctx.bind(e, node);
146
            ctx.bind(e, node);
132
        }
147
        }
(-)sources/org/apache/batik/bridge/SVGTextElementBridge.java (+4 lines)
Lines 241-246 Link Here
241
        // DO NOT CALL super, 'opacity' is handle during addPaintAttributes()
241
        // DO NOT CALL super, 'opacity' is handle during addPaintAttributes()
242
        //
242
        //
243
243
244
        // 'opacity'
245
        node.setComposite(CSSUtilities.convertOpacity(e));
244
        // 'filter'
246
        // 'filter'
245
        node.setFilter(CSSUtilities.convertFilter(e, node, ctx));
247
        node.setFilter(CSSUtilities.convertFilter(e, node, ctx));
246
        // 'mask'
248
        // 'mask'
Lines 249-254 Link Here
249
        node.setClip(CSSUtilities.convertClipPath(e, node, ctx));
251
        node.setClip(CSSUtilities.convertClipPath(e, node, ctx));
250
        // 'pointer-events'
252
        // 'pointer-events'
251
        node.setPointerEventType(CSSUtilities.convertPointerEvents(e));
253
        node.setPointerEventType(CSSUtilities.convertPointerEvents(e));
254
        // ' rendering-color-space'
255
        node.setColorSpace(CSSUtilities.convertRenderingColorSpace(e, ctx));
252
256
253
        initializeDynamicSupport(ctx, e, node);
257
        initializeDynamicSupport(ctx, e, node);
254
258
(-)sources/org/apache/batik/css/engine/SVGCSSEngine.java (-1 / +4 lines)
Lines 93-98 Link Here
93
import org.apache.batik.css.engine.value.svg.MaskManager;
93
import org.apache.batik.css.engine.value.svg.MaskManager;
94
import org.apache.batik.css.engine.value.svg.OpacityManager;
94
import org.apache.batik.css.engine.value.svg.OpacityManager;
95
import org.apache.batik.css.engine.value.svg.PointerEventsManager;
95
import org.apache.batik.css.engine.value.svg.PointerEventsManager;
96
import org.apache.batik.css.engine.value.svg.RenderingColorSpaceManager;
96
import org.apache.batik.css.engine.value.svg.SVGColorManager;
97
import org.apache.batik.css.engine.value.svg.SVGColorManager;
97
import org.apache.batik.css.engine.value.svg.SVGPaintManager;
98
import org.apache.batik.css.engine.value.svg.SVGPaintManager;
98
import org.apache.batik.css.engine.value.svg.ShapeRenderingManager;
99
import org.apache.batik.css.engine.value.svg.ShapeRenderingManager;
Lines 259-264 Link Here
259
        new OverflowManager(),
260
        new OverflowManager(),
260
261
261
        new PointerEventsManager(),
262
        new PointerEventsManager(),
263
        new RenderingColorSpaceManager(),
262
        new SrcManager(),
264
        new SrcManager(),
263
        new ShapeRenderingManager(),
265
        new ShapeRenderingManager(),
264
        new SVGColorManager(CSSConstants.CSS_STOP_COLOR_PROPERTY),
266
        new SVGColorManager(CSSConstants.CSS_STOP_COLOR_PROPERTY),
Lines 356-362 Link Here
356
    
358
    
357
359
358
    public final static int POINTER_EVENTS_INDEX = OVERFLOW_INDEX + 1;
360
    public final static int POINTER_EVENTS_INDEX = OVERFLOW_INDEX + 1;
359
    public final static int SRC_INDEX = POINTER_EVENTS_INDEX + 1;
361
    public final static int RENDERING_COLOR_SPACE_INDEX = POINTER_EVENTS_INDEX + 1;
362
    public final static int SRC_INDEX = RENDERING_COLOR_SPACE_INDEX + 1;
360
    public final static int SHAPE_RENDERING_INDEX = SRC_INDEX + 1;
363
    public final static int SHAPE_RENDERING_INDEX = SRC_INDEX + 1;
361
    public final static int STOP_COLOR_INDEX = SHAPE_RENDERING_INDEX + 1;
364
    public final static int STOP_COLOR_INDEX = SHAPE_RENDERING_INDEX + 1;
362
    public final static int STOP_OPACITY_INDEX = STOP_COLOR_INDEX + 1;
365
    public final static int STOP_OPACITY_INDEX = STOP_COLOR_INDEX + 1;
(-)sources/org/apache/batik/css/engine/value/svg/ColorInterpolationFiltersManager.java (-1 / +1 lines)
Lines 59-65 Link Here
59
 * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
59
 * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
60
 * @version $Id: ColorInterpolationFiltersManager.java,v 1.3 2003/08/08 11:38:56 vhardy Exp $
60
 * @version $Id: ColorInterpolationFiltersManager.java,v 1.3 2003/08/08 11:38:56 vhardy Exp $
61
 */
61
 */
62
public class ColorInterpolationFiltersManager extends ColorInterpolationManager {
62
public class ColorInterpolationFiltersManager extends ColorProfileManager {
63
    
63
    
64
    /**
64
    /**
65
     * Implements {@link
65
     * Implements {@link
(-)sources/org/apache/batik/css/engine/value/svg/ColorInterpolationManager.java (-29 / +1 lines)
Lines 61-88 Link Here
61
 * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
61
 * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
62
 * @version $Id: ColorInterpolationManager.java,v 1.3 2003/08/08 11:38:56 vhardy Exp $
62
 * @version $Id: ColorInterpolationManager.java,v 1.3 2003/08/08 11:38:56 vhardy Exp $
63
 */
63
 */
64
public class ColorInterpolationManager extends IdentifierManager {
64
public class ColorInterpolationManager extends ColorProfileManager {
65
    
66
    /**
67
     * The identifier values.
68
     */
69
    protected final static StringMap values = new StringMap();
70
    static {
71
	values.put(CSSConstants.CSS_AUTO_VALUE,
72
                   SVGValueConstants.AUTO_VALUE);
73
	values.put(CSSConstants.CSS_LINEARRGB_VALUE,
74
                   SVGValueConstants.LINEARRGB_VALUE);
75
	values.put(CSSConstants.CSS_SRGB_VALUE,
76
                   SVGValueConstants.SRGB_VALUE);
77
    }
78
79
    /**
80
     * Implements {@link
81
     * org.apache.batik.css.engine.value.ValueManager#isInheritedProperty()}.
82
     */
83
    public boolean isInheritedProperty() {
84
	return true;
85
    }
86
65
87
    /**
66
    /**
88
     * Implements {@link
67
     * Implements {@link
Lines 98-109 Link Here
98
     */
77
     */
99
    public Value getDefaultValue() {
78
    public Value getDefaultValue() {
100
        return SVGValueConstants.SRGB_VALUE;
79
        return SVGValueConstants.SRGB_VALUE;
101
    }
102
103
    /**
104
     * Implements {@link IdentifierManager#getIdentifiers()}.
105
     */
106
    protected StringMap getIdentifiers() {
107
        return values;
108
    }
80
    }
109
}
81
}
(-)sources/org/apache/batik/css/engine/value/svg/ColorProfileManager.java (+8 lines)
Lines 106-111 Link Here
106
            if (s.equals(CSSConstants.CSS_SRGB_VALUE)) {
106
            if (s.equals(CSSConstants.CSS_SRGB_VALUE)) {
107
                return SVGValueConstants.SRGB_VALUE;
107
                return SVGValueConstants.SRGB_VALUE;
108
            }
108
            }
109
            if (s.equals(CSSConstants.CSS_LINEARRGB_VALUE)) {
110
                return SVGValueConstants.LINEARRGB_VALUE;
111
            }
109
            return new StringValue(CSSPrimitiveValue.CSS_IDENT, s);
112
            return new StringValue(CSSPrimitiveValue.CSS_IDENT, s);
110
            
113
            
111
        case LexicalUnit.SAC_URI:
114
        case LexicalUnit.SAC_URI:
Lines 131-136 Link Here
131
            if (s.equals(CSSConstants.CSS_SRGB_VALUE)) {
134
            if (s.equals(CSSConstants.CSS_SRGB_VALUE)) {
132
                return SVGValueConstants.SRGB_VALUE;
135
                return SVGValueConstants.SRGB_VALUE;
133
            }
136
            }
137
            if (s.equals(CSSConstants.CSS_LINEARRGB_VALUE)) {
138
                return SVGValueConstants.LINEARRGB_VALUE;
139
            }
134
            return new StringValue(CSSPrimitiveValue.CSS_IDENT, s);
140
            return new StringValue(CSSPrimitiveValue.CSS_IDENT, s);
135
141
136
        case CSSPrimitiveValue.CSS_URI:
142
        case CSSPrimitiveValue.CSS_URI:
Lines 140-142 Link Here
140
        throw createInvalidStringTypeDOMException(type);
146
        throw createInvalidStringTypeDOMException(type);
141
    }
147
    }
142
}
148
}
149
150
(-)sources/org/apache/batik/css/engine/value/svg/RenderingColorSpaceManager.java (+83 lines)
Added Link Here
1
/*
2
3
 ============================================================================
4
                   The Apache Software License, Version 1.1
5
 ============================================================================
6
7
 Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
8
9
 Redistribution and use in source and binary forms, with or without modifica-
10
 tion, are permitted provided that the following conditions are met:
11
12
 1. Redistributions of  source code must  retain the above copyright  notice,
13
    this list of conditions and the following disclaimer.
14
15
 2. Redistributions in binary form must reproduce the above copyright notice,
16
    this list of conditions and the following disclaimer in the documentation
17
    and/or other materials provided with the distribution.
18
19
 3. The end-user documentation included with the redistribution, if any, must
20
    include  the following  acknowledgment:  "This product includes  software
21
    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
22
    Alternately, this  acknowledgment may  appear in the software itself,  if
23
    and wherever such third-party acknowledgments normally appear.
24
25
 4. The names "Batik" and  "Apache Software Foundation" must  not  be
26
    used to  endorse or promote  products derived from  this software without
27
    prior written permission. For written permission, please contact
28
    apache@apache.org.
29
30
 5. Products  derived from this software may not  be called "Apache", nor may
31
    "Apache" appear  in their name,  without prior written permission  of the
32
    Apache Software Foundation.
33
34
 THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
35
 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
36
 FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
37
 APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
38
 INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
39
 DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
40
 OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
41
 ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
42
 (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
43
 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44
45
 This software  consists of voluntary contributions made  by many individuals
46
 on  behalf of the Apache Software  Foundation. For more  information on the
47
 Apache Software Foundation, please see <http://www.apache.org/>.
48
49
*/
50
51
package org.apache.batik.css.engine.value.svg;
52
53
import org.apache.batik.css.engine.CSSEngine;
54
import org.apache.batik.css.engine.value.StringValue;
55
import org.apache.batik.css.engine.value.URIValue;
56
import org.apache.batik.css.engine.value.Value;
57
import org.apache.batik.util.CSSConstants;
58
import org.w3c.css.sac.LexicalUnit;
59
import org.w3c.dom.DOMException;
60
import org.w3c.dom.css.CSSPrimitiveValue;
61
62
/**
63
 * This class provides a manager for the 'rendering-color-space'
64
 * property values.
65
 *
66
 * @version $Id: skel.el,v 1.1 2003/05/13 21:04:46 deweese Exp $
67
 */
68
public class RenderingColorSpaceManager extends ColorProfileManager {
69
70
    /**
71
     * Implements {@link ValueManager#getPropertyName()}.
72
     */
73
    public String getPropertyName() {
74
	return CSSConstants.CSS_RENDERING_COLOR_SPACE_PROPERTY;
75
    }
76
77
    /**
78
     * Implements {@link ValueManager#getDefaultValue()}.
79
     */
80
    public Value getDefaultValue() {
81
        return SVGValueConstants.SRGB_VALUE;
82
    }
83
};
(-)sources/org/apache/batik/ext/awt/LinearGradientPaint.java (-19 / +22 lines)
Lines 54-59 Link Here
54
import java.awt.PaintContext;
54
import java.awt.PaintContext;
55
import java.awt.Rectangle;
55
import java.awt.Rectangle;
56
import java.awt.RenderingHints;
56
import java.awt.RenderingHints;
57
import java.awt.color.ColorSpace;
57
import java.awt.geom.AffineTransform;
58
import java.awt.geom.AffineTransform;
58
import java.awt.geom.NoninvertibleTransformException;
59
import java.awt.geom.NoninvertibleTransformException;
59
import java.awt.geom.Point2D;
60
import java.awt.geom.Point2D;
Lines 160-166 Link Here
160
             fractions, 
161
             fractions, 
161
             colors,
162
             colors,
162
             NO_CYCLE,
163
             NO_CYCLE,
163
             SRGB);
164
             ColorSpace.getInstance(ColorSpace.CS_sRGB),
165
             ColorSpace.getInstance(ColorSpace.CS_sRGB));
164
    }
166
    }
165
167
166
    /**<p>
168
    /**<p>
Lines 200-206 Link Here
200
             fractions, 
202
             fractions, 
201
             colors,
203
             colors,
202
             cycleMethod,
204
             cycleMethod,
203
             SRGB);
205
             ColorSpace.getInstance(ColorSpace.CS_sRGB),
206
             ColorSpace.getInstance(ColorSpace.CS_sRGB));
204
    }
207
    }
205
208
206
    /**<p>
209
    /**<p>
Lines 226-232 Link Here
226
    public LinearGradientPaint(Point2D start, Point2D end, float[] fractions,
229
    public LinearGradientPaint(Point2D start, Point2D end, float[] fractions,
227
                               Color[] colors) {
230
                               Color[] colors) {
228
231
229
        this(start, end, fractions, colors, NO_CYCLE, SRGB);
232
        this(start, end, fractions, colors, NO_CYCLE,
233
             ColorSpace.getInstance(ColorSpace.CS_sRGB),
234
             ColorSpace.getInstance(ColorSpace.CS_sRGB));
230
    }
235
    }
231
    
236
    
232
    /**<p>
237
    /**<p>
Lines 256-265 Link Here
256
    public LinearGradientPaint(Point2D start, Point2D end, float[] fractions,
261
    public LinearGradientPaint(Point2D start, Point2D end, float[] fractions,
257
                               Color[] colors, 
262
                               Color[] colors, 
258
                               CycleMethodEnum cycleMethod, 
263
                               CycleMethodEnum cycleMethod, 
259
                               ColorSpaceEnum colorSpace) {
264
                               ColorSpace interpColorSpace,
265
                               ColorSpace destColorSpace) {
260
	
266
	
261
        this(start, end, fractions, colors, cycleMethod, colorSpace, 
267
        this(start, end, fractions, colors, cycleMethod, 
262
             new AffineTransform());
268
             interpColorSpace, destColorSpace, new AffineTransform());
263
	
269
	
264
    }
270
    }
265
    
271
    
Lines 293-301 Link Here
293
    public LinearGradientPaint(Point2D start, Point2D end, float[] fractions,
299
    public LinearGradientPaint(Point2D start, Point2D end, float[] fractions,
294
                               Color[] colors,
300
                               Color[] colors,
295
                               CycleMethodEnum cycleMethod, 
301
                               CycleMethodEnum cycleMethod, 
296
                               ColorSpaceEnum colorSpace, 
302
                               ColorSpace interpColorSpace,
303
                               ColorSpace destColorSpace, 
297
                               AffineTransform gradientTransform) {
304
                               AffineTransform gradientTransform) {
298
        super(fractions, colors, cycleMethod, colorSpace, gradientTransform);
305
        super(fractions, colors, cycleMethod, 
306
              interpColorSpace, destColorSpace, gradientTransform);
299
307
300
        //
308
        //
301
        // Check input parameters
309
        // Check input parameters
Lines 352-368 Link Here
352
        transform.concatenate(gradientTransform); 
360
        transform.concatenate(gradientTransform); 
353
361
354
        try {
362
        try {
355
            return new LinearGradientPaintContext(cm, 
363
            return new LinearGradientPaintContext
356
                                                  deviceBounds,
364
                (cm, deviceBounds, userBounds, 
357
                                                  userBounds, 
365
                 transform, hints,
358
                                                  transform,
366
                 start, end, fractions,
359
                                                  hints,
367
                 this.getColors(), cycleMethod,
360
                                                  start, 
368
                 interpolationColorSpace, destinationColorSpace);
361
                                                  end,
362
                                                  fractions,
363
                                                  this.getColors(),
364
                                                  cycleMethod,
365
                                                  colorSpace);
366
        }
369
        }
367
	
370
	
368
        catch(NoninvertibleTransformException e) {
371
        catch(NoninvertibleTransformException e) {
(-)sources/org/apache/batik/ext/awt/LinearGradientPaintContext.java (-3 / +4 lines)
Lines 53-58 Link Here
53
import java.awt.Color;
53
import java.awt.Color;
54
import java.awt.Rectangle;
54
import java.awt.Rectangle;
55
import java.awt.RenderingHints;
55
import java.awt.RenderingHints;
56
import java.awt.color.ColorSpace;
56
import java.awt.geom.AffineTransform;
57
import java.awt.geom.AffineTransform;
57
import java.awt.geom.NoninvertibleTransformException;
58
import java.awt.geom.NoninvertibleTransformException;
58
import java.awt.geom.Point2D;
59
import java.awt.geom.Point2D;
Lines 128-139 Link Here
128
                                      Color[] colors, 
129
                                      Color[] colors, 
129
                                      MultipleGradientPaint.CycleMethodEnum 
130
                                      MultipleGradientPaint.CycleMethodEnum 
130
                                      cycleMethod,
131
                                      cycleMethod,
131
                                      MultipleGradientPaint.ColorSpaceEnum 
132
                                      ColorSpace interpColorSpace,
132
                                      colorSpace)
133
                                      ColorSpace destColorSpace)
133
        throws NoninvertibleTransformException
134
        throws NoninvertibleTransformException
134
    {	
135
    {	
135
        super(cm, deviceBounds, userBounds, t, hints, fractions, 
136
        super(cm, deviceBounds, userBounds, t, hints, fractions, 
136
              colors, cycleMethod, colorSpace);
137
              colors, cycleMethod, interpColorSpace, destColorSpace);
137
        
138
        
138
        // Use single precision floating points
139
        // Use single precision floating points
139
        Point2D.Float start = new Point2D.Float((float)dStart.getX(),
140
        Point2D.Float start = new Point2D.Float((float)dStart.getX(),
(-)sources/org/apache/batik/ext/awt/MultipleGradientPaint.java (-31 / +24 lines)
Lines 52-57 Link Here
52
52
53
import java.awt.Color;
53
import java.awt.Color;
54
import java.awt.Paint;
54
import java.awt.Paint;
55
import java.awt.color.ColorSpace;
55
import java.awt.geom.AffineTransform;
56
import java.awt.geom.AffineTransform;
56
57
57
/** This is the superclass for Paints which use a multiple color
58
/** This is the superclass for Paints which use a multiple color
Lines 83-93 Link Here
83
    protected CycleMethodEnum cycleMethod;
84
    protected CycleMethodEnum cycleMethod;
84
85
85
    /** The colorSpace in which to perform the interpolation. */
86
    /** The colorSpace in which to perform the interpolation. */
86
    protected ColorSpaceEnum colorSpace;
87
    protected ColorSpace interpolationColorSpace;
87
88
88
    /** Inner class to allow for typesafe enumerated ColorSpace values. */
89
    /** The colorSpace of the destination. */
89
    public static class ColorSpaceEnum {
90
    protected ColorSpace destinationColorSpace;
90
    }
91
91
92
    /** Inner class to allow for typesafe enumerated CycleMethod values. */
92
    /** Inner class to allow for typesafe enumerated CycleMethod values. */
93
    public static class CycleMethodEnum {
93
    public static class CycleMethodEnum {
Lines 110-126 Link Here
110
     */
110
     */
111
    public static final CycleMethodEnum REPEAT = new CycleMethodEnum();
111
    public static final CycleMethodEnum REPEAT = new CycleMethodEnum();
112
112
113
    /** Indicates that the color interpolation should occur in sRGB space.
114
     *  (default)
115
     */
116
    public static final ColorSpaceEnum SRGB = new ColorSpaceEnum();
117
118
    /** Indicates that the color interpolation should occur in linearized
119
     *  RGB space.
120
     */
121
    public static final ColorSpaceEnum LINEAR_RGB = new ColorSpaceEnum();
122
123
124
     /**
113
     /**
125
     * Superclass constructor, typical user should never have to call this.
114
     * Superclass constructor, typical user should never have to call this.
126
     *
115
     *
Lines 131-138 Link Here
131
     *
120
     *
132
     * @param cycleMethod either NO_CYCLE, REFLECT, or REPEAT
121
     * @param cycleMethod either NO_CYCLE, REFLECT, or REPEAT
133
     *
122
     *
134
     * @param colorSpace which colorspace to use for interpolation,
123
     * @param interpolationColorSpace which colorspace to use for
135
     * either SRGB or LINEAR_RGB
124
     * interpolation.
125
     *
126
     * @param destinationColorSpace the destination colorspace.
136
     *
127
     *
137
     * @param gradientTransform transform to apply to the gradient
128
     * @param gradientTransform transform to apply to the gradient
138
     *
129
     *
Lines 147-153 Link Here
147
    public MultipleGradientPaint(float[] fractions,
138
    public MultipleGradientPaint(float[] fractions,
148
                                 Color[] colors,
139
                                 Color[] colors,
149
                                 CycleMethodEnum cycleMethod,
140
                                 CycleMethodEnum cycleMethod,
150
                                 ColorSpaceEnum colorSpace,
141
                                 ColorSpace interpolationColorSpace,
142
                                 ColorSpace destinationColorSpace,
151
                                 AffineTransform gradientTransform) {
143
                                 AffineTransform gradientTransform) {
152
144
153
        if (fractions == null) {
145
        if (fractions == null) {
Lines 169-180 Link Here
169
                                               "2 colors");
161
                                               "2 colors");
170
        }
162
        }
171
163
172
        if ((colorSpace != LINEAR_RGB) &&
173
            (colorSpace != SRGB)) {
174
            throw new IllegalArgumentException("Invalid colorspace for " +
175
                                               "interpolation.");
176
        }
177
178
        if ((cycleMethod != NO_CYCLE) &&
164
        if ((cycleMethod != NO_CYCLE) &&
179
            (cycleMethod != REFLECT) &&
165
            (cycleMethod != REFLECT) &&
180
            (cycleMethod != REPEAT)) {
166
            (cycleMethod != REPEAT)) {
Lines 195-201 Link Here
195
        System.arraycopy(colors, 0, this.colors, 0, colors.length);
181
        System.arraycopy(colors, 0, this.colors, 0, colors.length);
196
182
197
        //copy some flags
183
        //copy some flags
198
        this.colorSpace = colorSpace;
184
        this.interpolationColorSpace = interpolationColorSpace;
185
        this.destinationColorSpace   = destinationColorSpace;
199
        this.cycleMethod = cycleMethod;
186
        this.cycleMethod = cycleMethod;
200
187
201
        //copy the gradient transform
188
        //copy the gradient transform
Lines 259-271 Link Here
259
    }
246
    }
260
247
261
    /**
248
    /**
262
     * Returns the enumerated type which specifies color space for
249
     * Returns the color space for interpolation.
263
     * interpolation.
250
     * @return the color space for interpolation
264
     * @return the enumerated type which specifies color space for
251
     */
265
     * interpolation
252
    public ColorSpace getInterpolationColorSpace() {
253
        return interpolationColorSpace;
254
    }
255
256
    /**
257
     * Returns the color space for the destination
258
     * @return the color space for the destination
266
     */
259
     */
267
    public ColorSpaceEnum getColorSpace() {
260
    public ColorSpace getDestinationColorSpace() {
268
        return colorSpace;
261
        return destinationColorSpace;
269
    }
262
    }
270
263
271
    /**
264
    /**
(-)sources/org/apache/batik/ext/awt/MultipleGradientPaintContext.java (-84 / +93 lines)
Lines 129-135 Link Here
129
    protected MultipleGradientPaint.CycleMethodEnum cycleMethod;
129
    protected MultipleGradientPaint.CycleMethodEnum cycleMethod;
130
130
131
    /** The colorSpace in which to perform the interpolation */
131
    /** The colorSpace in which to perform the interpolation */
132
    protected MultipleGradientPaint.ColorSpaceEnum colorSpace;
132
    protected ColorSpace interpolationColorSpace;
133
134
    /** The colorSpace of the destination */
135
    protected ColorSpace destinationColorSpace;
133
136
134
    /** Elements of the inverse transform matrix. */
137
    /** Elements of the inverse transform matrix. */
135
    protected float a00, a01, a10, a11, a02, a12;
138
    protected float a00, a01, a10, a11, a02, a12;
Lines 230-237 Link Here
230
                                        Color[] colors,
233
                                        Color[] colors,
231
                                        MultipleGradientPaint.CycleMethodEnum
234
                                        MultipleGradientPaint.CycleMethodEnum
232
                                        cycleMethod,
235
                                        cycleMethod,
233
                                        MultipleGradientPaint.ColorSpaceEnum
236
                                        ColorSpace interpColorSpace,
234
                                        colorSpace)
237
                                        ColorSpace destColorSpace)
235
        throws NoninvertibleTransformException
238
        throws NoninvertibleTransformException
236
    {
239
    {
237
        //We have to deal with the cases where the 1st gradient stop is not
240
        //We have to deal with the cases where the 1st gradient stop is not
Lines 264-272 Link Here
264
        Color [] hiColors   = new Color[len-1];
267
        Color [] hiColors   = new Color[len-1];
265
        normalizedIntervals = new float[len-1];
268
        normalizedIntervals = new float[len-1];
266
269
267
        gradientUnderflow = colors[0].getRGB();
268
        gradientOverflow  = colors[colors.length-1].getRGB();
269
270
        int idx = 0;
270
        int idx = 0;
271
        if (fixFirst) {
271
        if (fixFirst) {
272
            this.fractions[0] = 0;
272
            this.fractions[0] = 0;
Lines 315-330 Link Here
315
315
316
        //copy some flags
316
        //copy some flags
317
        this.cycleMethod = cycleMethod;
317
        this.cycleMethod = cycleMethod;
318
        this.colorSpace = colorSpace;
318
        this.interpolationColorSpace = interpColorSpace;
319
        this.destinationColorSpace   = destColorSpace;
320
321
        if (this.interpolationColorSpace == null)
322
            this.interpolationColorSpace = 
323
                ColorSpace.getInstance(ColorSpace.CS_sRGB);
324
        if (this.destinationColorSpace == null)
325
            this.destinationColorSpace = 
326
                ColorSpace.getInstance(ColorSpace.CS_sRGB);
327
328
        gradientUnderflow = convertColor(colors[0].getRGB());
329
        gradientOverflow  = convertColor(colors[colors.length-1].getRGB());
319
330
320
        // Setup an example Model, we may refine it later.
321
        if (cm.getColorSpace() == lrgbmodel_A.getColorSpace())
322
            dataModel = lrgbmodel_A;
323
        else if (cm.getColorSpace() == srgbmodel_A.getColorSpace())
324
            dataModel = srgbmodel_A;
331
            dataModel = srgbmodel_A;
325
        else
326
            throw new IllegalArgumentException
327
                ("Unsupported ColorSpace for interpolation");
328
332
329
        calculateGradientFractions(loColors, hiColors);
333
        calculateGradientFractions(loColors, hiColors);
330
334
Lines 340-363 Link Here
340
    protected final void calculateGradientFractions
344
    protected final void calculateGradientFractions
341
        (Color []loColors, Color []hiColors) {
345
        (Color []loColors, Color []hiColors) {
342
346
343
        //if interpolation should occur in Linear RGB space, convert the
344
        //colors using the lookup table
345
        if (colorSpace == LinearGradientPaint.LINEAR_RGB) {
346
            for (int i = 0; i < loColors.length; i++) {
347
                loColors[i] = 
348
                    new Color(SRGBtoLinearRGB[loColors[i].getRed()],
349
                              SRGBtoLinearRGB[loColors[i].getGreen()],
350
                              SRGBtoLinearRGB[loColors[i].getBlue()],
351
                              loColors[i].getAlpha());
352
                
353
                hiColors[i] = 
354
                    new Color(SRGBtoLinearRGB[hiColors[i].getRed()],
355
                              SRGBtoLinearRGB[hiColors[i].getGreen()],
356
                              SRGBtoLinearRGB[hiColors[i].getBlue()],
357
                              hiColors[i].getAlpha());
358
            }
359
        }
360
361
        //initialize to be fully opaque for ANDing with colors
347
        //initialize to be fully opaque for ANDing with colors
362
        transparencyTest = 0xff000000;
348
        transparencyTest = 0xff000000;
363
        if (cycleMethod == MultipleGradientPaint.NO_CYCLE) {
349
        if (cycleMethod == MultipleGradientPaint.NO_CYCLE) {
Lines 415-423 Link Here
415
401
416
        // Use the most 'economical' model (no alpha).
402
        // Use the most 'economical' model (no alpha).
417
        if((transparencyTest >>> 24) == 0xff) {
403
        if((transparencyTest >>> 24) == 0xff) {
418
            if (dataModel.getColorSpace() == lrgbmodel_NA.getColorSpace())
419
                dataModel = lrgbmodel_NA;
420
            else if (dataModel.getColorSpace() == srgbmodel_NA.getColorSpace())
421
                dataModel = srgbmodel_NA;
404
                dataModel = srgbmodel_NA;
422
            model = dataModel;
405
            model = dataModel;
423
        }
406
        }
Lines 509-538 Link Here
509
        }
492
        }
510
        gradient[gradient.length-1] = hiColors[hiColors.length-1].getRGB();
493
        gradient[gradient.length-1] = hiColors[hiColors.length-1].getRGB();
511
494
512
        //if interpolation occurred in Linear RGB space, convert the
495
        // if interpolation occurred in a different colorspace than
513
        //gradients back to SRGB using the lookup table
496
        // our destination then color covert the interpolated arrays
514
        if (colorSpace == LinearGradientPaint.LINEAR_RGB) {
497
        // to the destination colorspace.
515
            if (dataModel.getColorSpace() ==
498
        if (!interpolationColorSpace.equals(destinationColorSpace)) {
516
                ColorSpace.getInstance(ColorSpace.CS_sRGB)) {
499
            convertColorArray(gradient);
517
                for (int i = 0; i < gradient.length; i++) {
500
            gradientAverage = convertColor(gradientAverage);
518
                    gradient[i] =
519
                        convertEntireColorLinearRGBtoSRGB(gradient[i]);
520
                }
521
                gradientAverage = 
522
                    convertEntireColorLinearRGBtoSRGB(gradientAverage);
523
            }
524
        } else {
525
            if (dataModel.getColorSpace() ==
526
                ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB)) {
527
                for (int i = 0; i < gradient.length; i++) {
528
                    gradient[i] =
529
                        convertEntireColorSRGBtoLinearRGB(gradient[i]);
530
                }
531
                gradientAverage = 
532
                    convertEntireColorSRGBtoLinearRGB(gradientAverage);
533
            }
501
            }
534
        }
535
536
        fastGradientArraySize = gradient.length - 1;
502
        fastGradientArraySize = gradient.length - 1;
537
    }
503
    }
538
504
Lines 606-637 Link Here
606
                           ((aveG & 0xFF0000)>> 8) |
572
                           ((aveG & 0xFF0000)>> 8) |
607
                           ((aveB & 0xFF0000)>>16));
573
                           ((aveB & 0xFF0000)>>16));
608
574
609
        //if interpolation occurred in Linear RGB space, convert the
575
        // if interpolation occurred in a different colorspace than
610
        //gradients back to SRGB using the lookup table
576
        // our destination then color covert the interpolated arrays
611
        if (colorSpace == LinearGradientPaint.LINEAR_RGB) {
577
        // to the destination colorspace.
612
            if (dataModel.getColorSpace() ==
578
        if (!interpolationColorSpace.equals(destinationColorSpace)) {
613
                ColorSpace.getInstance(ColorSpace.CS_sRGB)) {
614
                for (int j = 0; j < gradients.length; j++) {
579
                for (int j = 0; j < gradients.length; j++) {
615
                    for (int i = 0; i < gradients[j].length; i++) {
580
                convertColorArray(gradients[j]);
616
                        gradients[j][i] =
617
                            convertEntireColorLinearRGBtoSRGB(gradients[j][i]);
618
                    }
619
                }
620
                gradientAverage = 
621
                    convertEntireColorLinearRGBtoSRGB(gradientAverage);
622
            }
623
        } else {
624
            if (dataModel.getColorSpace() ==
625
                ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB)) {
626
                for (int j = 0; j < gradients.length; j++) {
627
                    for (int i = 0; i < gradients[j].length; i++) {
628
                        gradients[j][i] =
629
                            convertEntireColorSRGBtoLinearRGB(gradients[j][i]);
630
                    }
631
                }
632
                gradientAverage = 
633
                    convertEntireColorSRGBtoLinearRGB(gradientAverage);
634
            }
581
            }
582
            gradientAverage = convertColor(gradientAverage);
635
        }
583
        }
636
    }
584
    }
637
585
Lines 678-684 Link Here
678
     * of an integer RGB triple, converts them from LinearRGB to SRGB, then
626
     * of an integer RGB triple, converts them from LinearRGB to SRGB, then
679
     * recompacts them into an int.
627
     * recompacts them into an int.
680
     */
628
     */
681
    private int convertEntireColorLinearRGBtoSRGB(int rgb) {
629
    private int convertColor(int rgb) {
630
        float [] interp = { ((rgb >> 16) & 0xff)/255f,
631
                            ((rgb >>  8) & 0xff)/255f,
632
                            ((rgb      ) & 0xff)/255f };
633
        interp = interpolationColorSpace.toCIEXYZ(interp);
634
        interp = destinationColorSpace.fromCIEXYZ(interp);
635
636
        //re-compact the components
637
        return ((rgb & 0xFF000000) |
638
                (((int)(interp[0]*255)) << 16) |
639
                (((int)(interp[1]*255)) <<  8) |
640
                (((int)(interp[2]*255))      ));
641
    }
642
643
    /** Yet another helper function.  This one extracts the color components
644
     * of an integer RGB triple, converts them from LinearRGB to SRGB, then
645
     * recompacts them into an int.
646
     */
647
    private void convertColorArray(int []data) {
648
        if (interpolationColorSpace == 
649
            ColorSpace.getInstance(ColorSpace.CS_sRGB)) {
650
            if (destinationColorSpace == 
651
                ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB)) {
652
                for (int i=0; i<data.length; i++) {
653
                    data[i] = convertColorSRGBtoLinearRGB(data[i]);
654
                }
655
                return;
656
            }
657
        } else if (interpolationColorSpace == 
658
                   ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB)) {
659
            if (destinationColorSpace == 
660
                ColorSpace.getInstance(ColorSpace.CS_sRGB)) {
661
                for (int i=0; i<data.length; i++) {
662
                    data[i] = convertColorLinearRGBtoSRGB(data[i]);
663
                }
664
                return;
665
            }
666
        }
667
668
        float [] interp = { 0, 0, 0, 0 };
669
        int rgb;
670
        for (int i=0; i<data.length; i++) {
671
            rgb = data[i];
672
            interp[0] = ((rgb >> 16) & 0xff)/255f;
673
            interp[1] = ((rgb >>  8) & 0xff)/255f;
674
            interp[2] = ((rgb      ) & 0xff)/255f;
675
            interp = interpolationColorSpace.toCIEXYZ(interp);
676
            interp = destinationColorSpace.fromCIEXYZ(interp);
677
                
678
            //re-compact the components
679
            data[i] = ((rgb & 0xFF000000) |
680
                       (((int)(interp[0]*255)) << 16) |
681
                       (((int)(interp[1]*255)) <<  8) |
682
                       (((int)(interp[2]*255))      ));
683
        }
684
    }
685
686
    /** Yet another helper function.  This one extracts the color components
687
     * of an integer RGB triple, converts them from LinearRGB to SRGB, then
688
     * recompacts them into an int.
689
     */
690
    private int convertColorLinearRGBtoSRGB(int rgb) {
682
691
683
        int a1, r1, g1, b1; //color components
692
        int a1, r1, g1, b1; //color components
684
693
Lines 704-710 Link Here
704
     * of an integer RGB triple, converts them from LinearRGB to SRGB, then
713
     * of an integer RGB triple, converts them from LinearRGB to SRGB, then
705
     * recompacts them into an int.
714
     * recompacts them into an int.
706
     */
715
     */
707
    private int convertEntireColorSRGBtoLinearRGB(int rgb) {
716
    private int convertColorSRGBtoLinearRGB(int rgb) {
708
717
709
        int a1, r1, g1, b1; //color components
718
        int a1, r1, g1, b1; //color components
710
719
(-)sources/org/apache/batik/ext/awt/RadialGradientPaint.java (-13 / +16 lines)
Lines 54-59 Link Here
54
import java.awt.PaintContext;
54
import java.awt.PaintContext;
55
import java.awt.Rectangle;
55
import java.awt.Rectangle;
56
import java.awt.RenderingHints;
56
import java.awt.RenderingHints;
57
import java.awt.color.ColorSpace;
57
import java.awt.geom.AffineTransform;
58
import java.awt.geom.AffineTransform;
58
import java.awt.geom.NoninvertibleTransformException;
59
import java.awt.geom.NoninvertibleTransformException;
59
import java.awt.geom.Point2D;
60
import java.awt.geom.Point2D;
Lines 264-270 Link Here
264
             fractions,
265
             fractions,
265
             colors,
266
             colors,
266
             NO_CYCLE,
267
             NO_CYCLE,
267
             SRGB);
268
             ColorSpace.getInstance(ColorSpace.CS_sRGB),
269
             ColorSpace.getInstance(ColorSpace.CS_sRGB));
268
    }
270
    }
269
    
271
    
270
    /**
272
    /**
Lines 305-311 Link Here
305
             fractions,
307
             fractions,
306
             colors,
308
             colors,
307
             NO_CYCLE,
309
             NO_CYCLE,
308
             SRGB);	
310
             ColorSpace.getInstance(ColorSpace.CS_sRGB),
311
             ColorSpace.getInstance(ColorSpace.CS_sRGB));	
309
    }
312
    }
310
    
313
    
311
    /**
314
    /**
Lines 345-358 Link Here
345
                               Point2D focus,
348
                               Point2D focus,
346
                               float[] fractions, Color[] colors,
349
                               float[] fractions, Color[] colors,
347
                               CycleMethodEnum cycleMethod, 
350
                               CycleMethodEnum cycleMethod, 
348
                               ColorSpaceEnum colorSpace) {
351
                               ColorSpace interpColorSpace,
349
        this(center,
352
                               ColorSpace destColorSpace) {
350
             radius,
353
        this(center, radius, focus,
351
             focus,
354
             fractions, colors, cycleMethod,
352
             fractions,
355
             interpColorSpace, destColorSpace,
353
             colors,
354
             cycleMethod,
355
             colorSpace,
356
             new AffineTransform());
356
             new AffineTransform());
357
    }
357
    }
358
358
Lines 397-405 Link Here
397
                               Point2D focus,
397
                               Point2D focus,
398
                               float[] fractions,  Color[] colors,
398
                               float[] fractions,  Color[] colors,
399
                               CycleMethodEnum cycleMethod, 
399
                               CycleMethodEnum cycleMethod, 
400
                               ColorSpaceEnum colorSpace,
400
                               ColorSpace      interpColorSpace,
401
                               ColorSpace      destColorSpace,
401
                               AffineTransform gradientTransform){
402
                               AffineTransform gradientTransform){
402
        super(fractions, colors, cycleMethod, colorSpace, gradientTransform);
403
        super(fractions, colors, cycleMethod, 
404
              interpColorSpace, destColorSpace, gradientTransform);
403
405
404
        // Check input arguments
406
        // Check input arguments
405
        if (center == null) {
407
        if (center == null) {
Lines 498-504 Link Here
498
                (cm, deviceBounds, userBounds, transform, hints,
500
                (cm, deviceBounds, userBounds, transform, hints,
499
                 (float)center.getX(), (float)center.getY(), radius,
501
                 (float)center.getX(), (float)center.getY(), radius,
500
                 (float)focus.getX(), (float)focus.getY(),
502
                 (float)focus.getX(), (float)focus.getY(),
501
                 fractions, colors, cycleMethod, colorSpace);       	    
503
                 fractions, colors, cycleMethod, 
504
                 interpolationColorSpace, destinationColorSpace);
502
        }
505
        }
503
	
506
	
504
        catch(NoninvertibleTransformException e){
507
        catch(NoninvertibleTransformException e){
(-)sources/org/apache/batik/ext/awt/RadialGradientPaintContext.java (-4 / +4 lines)
Lines 53-58 Link Here
53
import java.awt.Color;
53
import java.awt.Color;
54
import java.awt.Rectangle;
54
import java.awt.Rectangle;
55
import java.awt.RenderingHints;
55
import java.awt.RenderingHints;
56
import java.awt.color.ColorSpace;
56
import java.awt.geom.AffineTransform;
57
import java.awt.geom.AffineTransform;
57
import java.awt.geom.NoninvertibleTransformException;
58
import java.awt.geom.NoninvertibleTransformException;
58
import java.awt.geom.Rectangle2D;
59
import java.awt.geom.Rectangle2D;
Lines 147-153 Link Here
147
     *  @param cycleMethod either NO_CYCLE, REFLECT, or REPEAT
148
     *  @param cycleMethod either NO_CYCLE, REFLECT, or REPEAT
148
     *
149
     *
149
     *  @param colorSpace which colorspace to use for interpolation, 
150
     *  @param colorSpace which colorspace to use for interpolation, 
150
     *  either SRGB or LINEAR_RGB
151
     *
151
     *
152
     */
152
     */
153
    public RadialGradientPaintContext(ColorModel cm,
153
    public RadialGradientPaintContext(ColorModel cm,
Lines 162-173 Link Here
162
                                      Color[] colors,
162
                                      Color[] colors,
163
                                      MultipleGradientPaint.CycleMethodEnum 
163
                                      MultipleGradientPaint.CycleMethodEnum 
164
                                      cycleMethod,
164
                                      cycleMethod,
165
                                      MultipleGradientPaint.ColorSpaceEnum 
165
                                      ColorSpace interpColorSpace,
166
                                      colorSpace)
166
                                      ColorSpace destColorSpace)
167
        throws NoninvertibleTransformException
167
        throws NoninvertibleTransformException
168
    {       	
168
    {       	
169
        super(cm, deviceBounds, userBounds, t, hints, fractions, colors, 
169
        super(cm, deviceBounds, userBounds, t, hints, fractions, colors, 
170
              cycleMethod, colorSpace);
170
              cycleMethod, interpColorSpace, destColorSpace);
171
171
172
        //copy some parameters.
172
        //copy some parameters.
173
        centerX = cx;
173
        centerX = cx;
(-)sources/org/apache/batik/ext/awt/RealColorSpaceKey.java (+73 lines)
Added Link Here
1
/*
2
3
 ============================================================================
4
                   The Apache Software License, Version 1.1
5
 ============================================================================
6
7
 Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
8
9
 Redistribution and use in source and binary forms, with or without modifica-
10
 tion, are permitted provided that the following conditions are met:
11
12
 1. Redistributions of  source code must  retain the above copyright  notice,
13
    this list of conditions and the following disclaimer.
14
15
 2. Redistributions in binary form must reproduce the above copyright notice,
16
    this list of conditions and the following disclaimer in the documentation
17
    and/or other materials provided with the distribution.
18
19
 3. The end-user documentation included with the redistribution, if any, must
20
    include  the following  acknowledgment:  "This product includes  software
21
    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
22
    Alternately, this  acknowledgment may  appear in the software itself,  if
23
    and wherever such third-party acknowledgments normally appear.
24
25
 4. The names "Batik" and  "Apache Software Foundation" must  not  be
26
    used to  endorse or promote  products derived from  this software without
27
    prior written permission. For written permission, please contact
28
    apache@apache.org.
29
30
 5. Products  derived from this software may not  be called "Apache", nor may
31
    "Apache" appear  in their name,  without prior written permission  of the
32
    Apache Software Foundation.
33
34
 THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
35
 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
36
 FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
37
 APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
38
 INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
39
 DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
40
 OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
41
 ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
42
 (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
43
 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44
45
 This software  consists of voluntary contributions made  by many individuals
46
 on  behalf of the Apache Software  Foundation. For more  information on the
47
 Apache Software Foundation, please see <http://www.apache.org/>.
48
49
*/
50
51
package org.apache.batik.ext.awt;
52
53
import java.awt.RenderingHints;
54
import java.awt.color.ColorSpace;
55
56
/**
57
 * TranscodingHint as to what the destination of the drawing is.
58
 *
59
 * @author <a href="mailto:deweese@apache.org">Thomas DeWeese</a>
60
 * @version $Id: ColorSpaceHintKey.java,v 1.2 2003/08/08 11:39:04 vhardy Exp $
61
 */
62
public final class RealColorSpaceKey extends RenderingHints.Key {
63
64
    /** 
65
     * Note that this is package private.
66
     */
67
    RealColorSpaceKey(int number) { super(number); }
68
69
    public boolean isCompatibleValue(Object val) {
70
        return (val instanceof ColorSpace);
71
    }
72
}
73
(-)sources/org/apache/batik/ext/awt/RenderingHintsKeyExt.java (-1 / +9 lines)
Lines 95-103 Link Here
95
     */
95
     */
96
    public static final RenderingHints.Key KEY_COLORSPACE;
96
    public static final RenderingHints.Key KEY_COLORSPACE;
97
97
98
    /**
99
     * Hint to drawings that our real color space is different than
100
     * that returned by the Java2D calls.
101
     */
102
    public static final RenderingHints.Key KEY_REAL_COLORSPACE;
103
98
    static {
104
    static {
99
        int base = 10100;
105
        int base = 10100;
100
        RenderingHints.Key trans=null, aoi=null, bi=null, cs=null;
106
        RenderingHints.Key trans=null, aoi=null, bi=null, cs=null, rcs=null;
101
        while (true) {
107
        while (true) {
102
            int val = base;
108
            int val = base;
103
109
Lines 106-111 Link Here
106
                aoi   = new AreaOfInterestHintKey(val++);
112
                aoi   = new AreaOfInterestHintKey(val++);
107
                bi    = new BufferedImageHintKey (val++);
113
                bi    = new BufferedImageHintKey (val++);
108
                cs    = new ColorSpaceHintKey    (val++);
114
                cs    = new ColorSpaceHintKey    (val++);
115
                rcs    = new RealColorSpaceKey    (val++);
109
            } catch (Exception e) {
116
            } catch (Exception e) {
110
                System.err.println
117
                System.err.println
111
                    ("You have loaded the Batik jar files more than once\n" +
118
                    ("You have loaded the Batik jar files more than once\n" +
Lines 122-127 Link Here
122
        KEY_AREA_OF_INTEREST = aoi;
129
        KEY_AREA_OF_INTEREST = aoi;
123
        KEY_BUFFERED_IMAGE   = bi;
130
        KEY_BUFFERED_IMAGE   = bi;
124
        KEY_COLORSPACE       = cs;
131
        KEY_COLORSPACE       = cs;
132
        KEY_REAL_COLORSPACE  = rcs;
125
    }
133
    }
126
134
127
    /**
135
    /**
(-)sources/org/apache/batik/ext/awt/color/ICCColorSpaceExt.java (+3 lines)
Lines 97-102 Link Here
97
        }
97
        }
98
    }
98
    }
99
99
100
101
    public int getType() { return TYPE_3CLR; }
102
100
    /**
103
    /**
101
     * Returns the sRGB value obtained by forcing the 
104
     * Returns the sRGB value obtained by forcing the 
102
     * conversion method to the intent passed to the 
105
     * conversion method to the intent passed to the 
(-)sources/org/apache/batik/ext/awt/color/NamedProfileCache.java (-6 / +7 lines)
Lines 50-55 Link Here
50
50
51
package org.apache.batik.ext.awt.color;
51
package org.apache.batik.ext.awt.color;
52
52
53
import java.awt.color.ColorSpace;
53
import org.apache.batik.util.SoftReferenceCache;
54
import org.apache.batik.util.SoftReferenceCache;
54
55
55
/**
56
/**
Lines 72-78 Link Here
72
    public NamedProfileCache() { }
73
    public NamedProfileCache() { }
73
74
74
    /**
75
    /**
75
     * Check if <tt>request(profileName)</tt> will return with a ICCColorSpaceExt
76
     * Check if <tt>request(profileName)</tt> will return with a ColorSpace
76
     * (not putting you on the hook for it).  Note that it is possible
77
     * (not putting you on the hook for it).  Note that it is possible
77
     * that this will return true but between this call and the call
78
     * that this will return true but between this call and the call
78
     * to request the soft-reference will be cleared.  So it
79
     * to request the soft-reference will be cleared.  So it
Lines 85-91 Link Here
85
86
86
    /**
87
    /**
87
     * Check if <tt>request(profileName)</tt> will return immediately with the
88
     * Check if <tt>request(profileName)</tt> will return immediately with the
88
     * ICCColorSpaceExt.  Note that it is possible that this will return
89
     * ColorSpace.  Note that it is possible that this will return
89
     * true but between this call and the call to request the
90
     * true but between this call and the call to request the
90
     * soft-reference will be cleared.
91
     * soft-reference will be cleared.
91
     */
92
     */
Lines 95-104 Link Here
95
96
96
    /**
97
    /**
97
     * If this returns null then you are now 'on the hook'.
98
     * If this returns null then you are now 'on the hook'.
98
     * to put the ICCColorSpaceExt associated with String into the
99
     * to put the ColorSpace associated with String into the
99
     * cache.  */
100
     * cache.  */
100
    public synchronized ICCColorSpaceExt request(String profileName) {
101
    public synchronized ColorSpace request(String profileName) {
101
        return (ICCColorSpaceExt)super.requestImpl(profileName);
102
        return (ColorSpace)super.requestImpl(profileName);
102
    }
103
    }
103
104
104
    /**
105
    /**
Lines 117-123 Link Here
117
     * probably cleared or flushed since we were put on the hook
118
     * probably cleared or flushed since we were put on the hook
118
     * for it, so in that case we will do nothing.
119
     * for it, so in that case we will do nothing.
119
     */
120
     */
120
    public synchronized void put(String profileName, ICCColorSpaceExt bi) {
121
    public synchronized void put(String profileName, ColorSpace bi) {
121
        super.putImpl(profileName, bi);
122
        super.putImpl(profileName, bi);
122
    }
123
    }
123
}
124
}
(-)sources/org/apache/batik/ext/awt/image/GraphicsUtil.java (-12 / +39 lines)
Lines 59-64 Link Here
59
import java.awt.RenderingHints;
59
import java.awt.RenderingHints;
60
import java.awt.Shape;
60
import java.awt.Shape;
61
import java.awt.color.ColorSpace;
61
import java.awt.color.ColorSpace;
62
import java.awt.color.ICC_ColorSpace;
63
import java.awt.color.ICC_Profile;
62
import java.awt.geom.AffineTransform;
64
import java.awt.geom.AffineTransform;
63
import java.awt.geom.Rectangle2D;
65
import java.awt.geom.Rectangle2D;
64
import java.awt.image.BufferedImage;
66
import java.awt.image.BufferedImage;
Lines 83-88 Link Here
83
import org.apache.batik.ext.awt.RenderingHintsKeyExt;
85
import org.apache.batik.ext.awt.RenderingHintsKeyExt;
84
import org.apache.batik.ext.awt.image.renderable.PaintRable;
86
import org.apache.batik.ext.awt.image.renderable.PaintRable;
85
import org.apache.batik.ext.awt.image.rendered.AffineRed;
87
import org.apache.batik.ext.awt.image.rendered.AffineRed;
88
import org.apache.batik.ext.awt.image.rendered.Any2AnyRed;
86
import org.apache.batik.ext.awt.image.rendered.Any2LsRGBRed;
89
import org.apache.batik.ext.awt.image.rendered.Any2LsRGBRed;
87
import org.apache.batik.ext.awt.image.rendered.Any2sRGBRed;
90
import org.apache.batik.ext.awt.image.rendered.Any2sRGBRed;
88
import org.apache.batik.ext.awt.image.rendered.BufferedImageCachableRed;
91
import org.apache.batik.ext.awt.image.rendered.BufferedImageCachableRed;
Lines 208-224 Link Here
208
        }
211
        }
209
212
210
        if (g2dCS != srcCM.getColorSpace()) {
213
        if (g2dCS != srcCM.getColorSpace()) {
211
            // System.out.println("srcCS: " + srcCM.getColorSpace());
214
            if (false) {
212
            // System.out.println("g2dCS: " + g2dCS);
215
                System.out.println("srcCS: " + srcCM.getColorSpace());
213
            // System.out.println("sRGB: " +
216
                System.out.println("g2dCS: " + g2dCS);
214
            //                    ColorSpace.getInstance(ColorSpace.CS_sRGB));
217
                System.out.println("sRGB: " +
215
            // System.out.println("LsRGB: " +
218
                                   ColorSpace.getInstance(ColorSpace.CS_sRGB));
216
            //                    ColorSpace.getInstance
219
                System.out.println("LsRGB: " +
217
            //                    (ColorSpace.CS_LINEAR_RGB));
220
                                   ColorSpace.getInstance
218
            if      (g2dCS == ColorSpace.getInstance(ColorSpace.CS_sRGB))
221
                                   (ColorSpace.CS_LINEAR_RGB));
219
                cr = convertTosRGB(cr);
222
            }
220
            else if (g2dCS == ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB))
223
221
                cr = convertToLsRGB(cr);
224
            cr = convertToColorSpace(cr, g2dCS);
222
        }
225
        }
223
        srcCM = cr.getColorModel();
226
        srcCM = cr.getColorModel();
224
        if (!drawCM.equals(srcCM))
227
        if (!drawCM.equals(srcCM))
Lines 491-507 Link Here
491
     *         stored in a rendering hint.
494
     *         stored in a rendering hint.
492
     */
495
     */
493
    public static Graphics2D createGraphics(BufferedImage bi,
496
    public static Graphics2D createGraphics(BufferedImage bi,
497
                                            ColorSpace    cs,
494
                                            RenderingHints hints) {
498
                                            RenderingHints hints) {
495
        Graphics2D g2d = bi.createGraphics();
499
        Graphics2D g2d = bi.createGraphics();
496
        if (hints != null)
500
        if (hints != null)
497
            g2d.addRenderingHints(hints);
501
            g2d.addRenderingHints(hints);
498
        g2d.setRenderingHint(RenderingHintsKeyExt.KEY_BUFFERED_IMAGE,
502
        g2d.setRenderingHint(RenderingHintsKeyExt.KEY_BUFFERED_IMAGE,
499
                             new WeakReference(bi));
503
                             new WeakReference(bi));
504
        g2d.setRenderingHint(RenderingHintsKeyExt.KEY_REAL_COLORSPACE, cs);
500
        g2d.clip(new Rectangle(0, 0, bi.getWidth(), bi.getHeight()));
505
        g2d.clip(new Rectangle(0, 0, bi.getWidth(), bi.getHeight()));
501
        return g2d;
506
        return g2d;
502
    }
507
    }
503
508
504
505
    public static Graphics2D createGraphics(BufferedImage bi) {
509
    public static Graphics2D createGraphics(BufferedImage bi) {
506
        Graphics2D g2d = bi.createGraphics();
510
        Graphics2D g2d = bi.createGraphics();
507
        g2d.setRenderingHint(RenderingHintsKeyExt.KEY_BUFFERED_IMAGE,
511
        g2d.setRenderingHint(RenderingHintsKeyExt.KEY_BUFFERED_IMAGE,
Lines 556-561 Link Here
556
    }
560
    }
557
561
558
    public static ColorSpace getDestinationColorSpace(Graphics2D g2d) {
562
    public static ColorSpace getDestinationColorSpace(Graphics2D g2d) {
563
        Object o = g2d.getRenderingHint
564
            (RenderingHintsKeyExt.KEY_REAL_COLORSPACE);
565
        if (o != null)
566
            return (ColorSpace)o;
567
559
        ColorModel cm = getDestinationColorModel(g2d);
568
        ColorModel cm = getDestinationColorModel(g2d);
560
        if (cm != null) return cm.getColorSpace();
569
        if (cm != null) return cm.getColorSpace();
561
570
Lines 703-708 Link Here
703
        return new Any2sRGBRed(src);
712
        return new Any2sRGBRed(src);
704
    }
713
    }
705
714
715
716
    public static CachableRed convertToColorSpace(CachableRed src, 
717
                                                  ColorSpace cs) {
718
        ColorModel srcCM = src.getColorModel();
719
        ColorSpace srcCS = srcCM.getColorSpace();
720
        if (cs == srcCS) return src;
721
        
722
        if (cs instanceof ICC_ColorSpace) {
723
            ICC_ColorSpace ics = (ICC_ColorSpace)cs;
724
            ICC_Profile profile = ics.getProfile();
725
            if (profile == ICC_Profile.getInstance(ColorSpace.CS_sRGB))
726
                return convertTosRGB(src);
727
            else if (profile == 
728
                     ICC_Profile.getInstance(ColorSpace.CS_LINEAR_RGB))
729
                return GraphicsUtil.convertToLsRGB(src);
730
        }
731
        return new Any2AnyRed(src, cs);
732
    }
706
    /**
733
    /**
707
     * Convertes any RenderedImage to a CacheableRed.  <p>
734
     * Convertes any RenderedImage to a CacheableRed.  <p>
708
     * If <tt>ri</tt> is already a CacheableRed it casts it down and
735
     * If <tt>ri</tt> is already a CacheableRed it casts it down and
(-)sources/org/apache/batik/ext/awt/image/renderable/AbstractColorInterpolationRable.java (-18 / +5 lines)
Lines 72-78 Link Here
72
     * Indicates if the operation should be done in linear or gamma
72
     * Indicates if the operation should be done in linear or gamma
73
     * corrected sRGB.
73
     * corrected sRGB.
74
     */
74
     */
75
    protected boolean csLinear = true;
75
    protected ColorSpace colorSpace;
76
76
77
    /**
77
    /**
78
     * void constructor. The subclass must call one of the
78
     * void constructor. The subclass must call one of the
Lines 126-160 Link Here
126
    }
126
    }
127
127
128
    /**
128
    /**
129
     * Returns true if this operation is to be performed in
130
     * the linear sRGB colorspace, returns false if the
131
     * operation is performed in gamma corrected sRGB.
132
     */
133
    public boolean isColorSpaceLinear() { return csLinear; }
134
135
    /**
136
     * Sets the colorspace the operation will be performed in.
129
     * Sets the colorspace the operation will be performed in.
137
     * @param csLinear if true this operation will be performed in the
130
     * @param csLinear if true this operation will be performed in the
138
     * linear sRGB colorspace, if false the operation will be performed in
131
     * linear sRGB colorspace, if false the operation will be performed in
139
     * gamma corrected sRGB.
132
     * gamma corrected sRGB.
140
     */
133
     */
141
    public void setColorSpaceLinear(boolean csLinear) {
134
    public void setOperationColorSpace(ColorSpace colorSpace) {
142
        touch();
135
        touch();
143
        this.csLinear = csLinear;
136
        this.colorSpace = colorSpace;
144
    }
137
    }
145
138
146
    public ColorSpace getOperationColorSpace() {
139
    public ColorSpace getOperationColorSpace() {
147
        if (csLinear)
140
        return colorSpace;
148
            return ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB);
149
        else
150
            return ColorSpace.getInstance(ColorSpace.CS_sRGB);
151
    }
141
    }
152
142
153
    protected CachableRed convertSourceCS(CachableRed cr) {
143
    protected CachableRed convertSourceCS(CachableRed cr) {
154
        if (csLinear)
144
        return GraphicsUtil.convertToColorSpace(cr, colorSpace);
155
            return GraphicsUtil.convertToLsRGB(cr);
156
        else
157
            return GraphicsUtil.convertTosRGB(cr);
158
    }
145
    }
159
146
160
    protected CachableRed convertSourceCS(RenderedImage ri) {
147
    protected CachableRed convertSourceCS(RenderedImage ri) {
(-)sources/org/apache/batik/ext/awt/image/renderable/ClipRable8Bit.java (-1 / +3 lines)
Lines 55-60 Link Here
55
import java.awt.Rectangle;
55
import java.awt.Rectangle;
56
import java.awt.RenderingHints;
56
import java.awt.RenderingHints;
57
import java.awt.Shape;
57
import java.awt.Shape;
58
import java.awt.color.ColorSpace;
58
import java.awt.geom.AffineTransform;
59
import java.awt.geom.AffineTransform;
59
import java.awt.geom.Rectangle2D;
60
import java.awt.geom.Rectangle2D;
60
import java.awt.image.BufferedImage;
61
import java.awt.image.BufferedImage;
Lines 167-173 Link Here
167
        Rectangle devAOIR;
168
        Rectangle devAOIR;
168
        devAOIR = usr2dev.createTransformedShape(aoi).getBounds();
169
        devAOIR = usr2dev.createTransformedShape(aoi).getBounds();
169
170
170
        Graphics2D g2d = GraphicsUtil.createGraphics(bi, rh);
171
        Graphics2D g2d = GraphicsUtil.createGraphics
172
            (bi, ColorSpace.getInstance(ColorSpace.CS_GRAY), rh);
171
173
172
        if (false) {
174
        if (false) {
173
            java.util.Set s = rh.keySet();
175
            java.util.Set s = rh.keySet();
(-)sources/org/apache/batik/ext/awt/image/renderable/CompositeRable8Bit.java (-4 / +1 lines)
Lines 85-95 Link Here
85
    protected CompositeRule rule;
85
    protected CompositeRule rule;
86
86
87
    public CompositeRable8Bit(List srcs,
87
    public CompositeRable8Bit(List srcs,
88
                              CompositeRule rule,
88
                              CompositeRule rule) {
89
                              boolean csIsLinear) {
90
        super(srcs);
89
        super(srcs);
91
92
        setColorSpaceLinear(csIsLinear);
93
90
94
        this.rule = rule;
91
        this.rule = rule;
95
    }
92
    }
(-)sources/org/apache/batik/ext/awt/image/renderable/DiffuseLightingRable8Bit.java (-1 / +2 lines)
Lines 53-58 Link Here
53
import java.awt.Rectangle;
53
import java.awt.Rectangle;
54
import java.awt.RenderingHints;
54
import java.awt.RenderingHints;
55
import java.awt.Shape;
55
import java.awt.Shape;
56
import java.awt.color.ColorSpace;
56
import java.awt.geom.AffineTransform;
57
import java.awt.geom.AffineTransform;
57
import java.awt.geom.Rectangle2D;
58
import java.awt.geom.Rectangle2D;
58
import java.awt.image.RenderedImage;
59
import java.awt.image.RenderedImage;
Lines 308-314 Link Here
308
309
309
        cr = new DiffuseLightingRed(kd, light, bumpMap,
310
        cr = new DiffuseLightingRed(kd, light, bumpMap,
310
                                    devRect, 1/scaleX, 1/scaleY,
311
                                    devRect, 1/scaleX, 1/scaleY,
311
                                    isColorSpaceLinear());
312
                                    getOperationColorSpace());
312
313
313
        // Return sheared/rotated tiled image
314
        // Return sheared/rotated tiled image
314
        AffineTransform shearAt =
315
        AffineTransform shearAt =
(-)sources/org/apache/batik/ext/awt/image/renderable/FilterColorInterpolation.java (-11 / +2 lines)
Lines 63-81 Link Here
63
public interface FilterColorInterpolation extends Filter {
63
public interface FilterColorInterpolation extends Filter {
64
64
65
    /**
65
    /**
66
     * Returns true if this operation is to be performed in
67
     * the linear sRGB colorspace, returns false if the
68
     * operation is performed in gamma corrected sRGB.
69
     */
70
    public boolean isColorSpaceLinear();
71
72
    /**
73
     * Sets the colorspace the operation will be performed in.
66
     * Sets the colorspace the operation will be performed in.
74
     * @param csLinear if true this operation will be performed in the
67
     * @param cs the color space to perform operation in.
75
     * linear sRGB colorspace, if false the operation will be performed in
76
     * gamma corrected sRGB.
77
     */
68
     */
78
    public void setColorSpaceLinear(boolean csLinear);
69
    public void setOperationColorSpace(ColorSpace cs);
79
70
80
    /**
71
    /**
81
     * Returns the ColorSpace that the object will perform
72
     * Returns the ColorSpace that the object will perform
(-)sources/org/apache/batik/ext/awt/image/renderable/FilterResRable8Bit.java (-5 / +7 lines)
Lines 254-265 Link Here
254
            // ourselves (limiting the resolution), and after that
254
            // ourselves (limiting the resolution), and after that
255
            // we simply draw the remainder...
255
            // we simply draw the remainder...
256
            int idx = li.nextIndex();  // index of first PaintRable...
256
            int idx = li.nextIndex();  // index of first PaintRable...
257
            Filter f = new CompositeRable8Bit(v.subList(0, idx),
257
            FilterColorInterpolation f;
258
                                              comp.getCompositeRule(),
258
            f = new CompositeRable8Bit(v.subList(0, idx),
259
                                              comp.isColorSpaceLinear());
259
                                       comp.getCompositeRule());
260
            f = new FilterResRable8Bit(f, getFilterResolutionX(),
260
            f.setOperationColorSpace(comp.getOperationColorSpace());
261
262
            Filter res = new FilterResRable8Bit(f, getFilterResolutionX(),
261
                                       getFilterResolutionY());
263
                                       getFilterResolutionY());
262
            GraphicsUtil.drawImage(g2d, f);
264
            GraphicsUtil.drawImage(g2d, res);
263
            while (li.hasNext()) {
265
            while (li.hasNext()) {
264
                PaintRable pr = (PaintRable)li.next();
266
                PaintRable pr = (PaintRable)li.next();
265
                if (!pr.paintRable(g2d)) {
267
                if (!pr.paintRable(g2d)) {
(-)sources/org/apache/batik/ext/awt/image/renderable/ProfileRable.java (-5 / +5 lines)
Lines 50-59 Link Here
50
50
51
package org.apache.batik.ext.awt.image.renderable;
51
package org.apache.batik.ext.awt.image.renderable;
52
52
53
import java.awt.color.ColorSpace;
53
import java.awt.image.RenderedImage;
54
import java.awt.image.RenderedImage;
54
import java.awt.image.renderable.RenderContext;
55
import java.awt.image.renderable.RenderContext;
55
56
56
import org.apache.batik.ext.awt.color.ICCColorSpaceExt;
57
import org.apache.batik.ext.awt.image.GraphicsUtil;
57
import org.apache.batik.ext.awt.image.GraphicsUtil;
58
import org.apache.batik.ext.awt.image.rendered.CachableRed;
58
import org.apache.batik.ext.awt.image.rendered.CachableRed;
59
import org.apache.batik.ext.awt.image.rendered.ProfileRed;
59
import org.apache.batik.ext.awt.image.rendered.ProfileRed;
Lines 67-79 Link Here
67
 */
67
 */
68
public class ProfileRable extends  AbstractRable{
68
public class ProfileRable extends  AbstractRable{
69
    
69
    
70
    private ICCColorSpaceExt colorSpace;
70
    private ColorSpace colorSpace;
71
71
72
    /**
72
    /**
73
     * Instances should be built through the static
73
     * Instances should be built through the static
74
     * factory methods
74
     * factory methods
75
     */
75
     */
76
    public ProfileRable(Filter src, ICCColorSpaceExt colorSpace){
76
    public ProfileRable(Filter src, ColorSpace colorSpace){
77
        super(src);
77
        super(src);
78
        this.colorSpace = colorSpace;
78
        this.colorSpace = colorSpace;
79
    }
79
    }
Lines 95-101 Link Here
95
    /**
95
    /**
96
     * Sets the ColorSpace of the Profile operation
96
     * Sets the ColorSpace of the Profile operation
97
     */
97
     */
98
    public void setColorSpace(ICCColorSpaceExt colorSpace){
98
    public void setColorSpace(ColorSpace colorSpace){
99
        touch();
99
        touch();
100
        this.colorSpace = colorSpace;
100
        this.colorSpace = colorSpace;
101
    }
101
    }
Lines 103-109 Link Here
103
    /**
103
    /**
104
     * Returns the ColorSpace of the Profile operation
104
     * Returns the ColorSpace of the Profile operation
105
     */
105
     */
106
    public ICCColorSpaceExt getColorSpace(){
106
    public ColorSpace getColorSpace(){
107
        return colorSpace;
107
        return colorSpace;
108
    }
108
    }
109
109
(-)sources/org/apache/batik/ext/awt/image/renderable/SpecularLightingRable8Bit.java (-1 / +2 lines)
Lines 53-58 Link Here
53
import java.awt.Rectangle;
53
import java.awt.Rectangle;
54
import java.awt.RenderingHints;
54
import java.awt.RenderingHints;
55
import java.awt.Shape;
55
import java.awt.Shape;
56
import java.awt.color.ColorSpace;
56
import java.awt.geom.AffineTransform;
57
import java.awt.geom.AffineTransform;
57
import java.awt.geom.Rectangle2D;
58
import java.awt.geom.Rectangle2D;
58
import java.awt.image.RenderedImage;
59
import java.awt.image.RenderedImage;
Lines 328-334 Link Here
328
329
329
        cr = new SpecularLightingRed(ks, specularExponent, light, bumpMap,
330
        cr = new SpecularLightingRed(ks, specularExponent, light, bumpMap,
330
                                     devRect, 1/scaleX, 1/scaleY,
331
                                     devRect, 1/scaleX, 1/scaleY,
331
                                     isColorSpaceLinear());
332
                                     getOperationColorSpace());
332
333
333
        // Return sheared/rotated tiled image
334
        // Return sheared/rotated tiled image
334
        AffineTransform shearAt =
335
        AffineTransform shearAt =
(-)sources/org/apache/batik/ext/awt/image/renderable/TileRable8Bit.java (+2 lines)
Lines 54-59 Link Here
54
import java.awt.Rectangle;
54
import java.awt.Rectangle;
55
import java.awt.RenderingHints;
55
import java.awt.RenderingHints;
56
import java.awt.Shape;
56
import java.awt.Shape;
57
import java.awt.color.ColorSpace;
57
import java.awt.geom.AffineTransform;
58
import java.awt.geom.AffineTransform;
58
import java.awt.geom.Point2D;
59
import java.awt.geom.Point2D;
59
import java.awt.geom.Rectangle2D;
60
import java.awt.geom.Rectangle2D;
Lines 654-659 Link Here
654
                                BufferedImage.TYPE_INT_ARGB);
655
                                BufferedImage.TYPE_INT_ARGB);
655
        
656
        
656
        Graphics2D g = GraphicsUtil.createGraphics(realTileBI,
657
        Graphics2D g = GraphicsUtil.createGraphics(realTileBI,
658
                                                   colorSpace,
657
                                                   rc.getRenderingHints());
659
                                                   rc.getRenderingHints());
658
        // g.setPaint(new java.awt.Color(0, 255, 0, 64));
660
        // g.setPaint(new java.awt.Color(0, 255, 0, 64));
659
        // g.fillRect(0, 0, realTileBI.getWidth(), realTileBI.getHeight());
661
        // g.fillRect(0, 0, realTileBI.getWidth(), realTileBI.getHeight());
(-)sources/org/apache/batik/ext/awt/image/rendered/Any2AnyRed.java (+164 lines)
Added Link Here
1
/*
2
3
 ============================================================================
4
                   The Apache Software License, Version 1.1
5
 ============================================================================
6
7
 Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
8
9
 Redistribution and use in source and binary forms, with or without modifica-
10
 tion, are permitted provided that the following conditions are met:
11
12
 1. Redistributions of  source code must  retain the above copyright  notice,
13
    this list of conditions and the following disclaimer.
14
15
 2. Redistributions in binary form must reproduce the above copyright notice,
16
    this list of conditions and the following disclaimer in the documentation
17
    and/or other materials provided with the distribution.
18
19
 3. The end-user documentation included with the redistribution, if any, must
20
    include  the following  acknowledgment:  "This product includes  software
21
    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
22
    Alternately, this  acknowledgment may  appear in the software itself,  if
23
    and wherever such third-party acknowledgments normally appear.
24
25
 4. The names "Batik" and  "Apache Software Foundation" must  not  be
26
    used to  endorse or promote  products derived from  this software without
27
    prior written permission. For written permission, please contact
28
    apache@apache.org.
29
30
 5. Products  derived from this software may not  be called "Apache", nor may
31
    "Apache" appear  in their name,  without prior written permission  of the
32
    Apache Software Foundation.
33
34
 THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
35
 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
36
 FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
37
 APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
38
 INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
39
 DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
40
 OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
41
 ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
42
 (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
43
 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44
45
 This software  consists of voluntary contributions made  by many individuals
46
 on  behalf of the Apache Software  Foundation. For more  information on the
47
 Apache Software Foundation, please see <http://www.apache.org/>.
48
49
*/
50
51
package org.apache.batik.ext.awt.image.rendered;
52
53
import java.awt.Transparency;
54
import java.awt.color.ColorSpace;
55
import java.awt.image.BufferedImage;
56
import java.awt.image.ColorConvertOp;
57
import java.awt.image.ColorModel;
58
import java.awt.image.DataBuffer;
59
import java.awt.image.Raster;
60
import java.awt.image.SampleModel;
61
import java.awt.image.ComponentSampleModel;
62
import java.awt.image.ComponentColorModel;
63
import java.awt.image.WritableRaster;
64
65
import org.apache.batik.ext.awt.image.GraphicsUtil;
66
67
/**
68
 * One line Class Desc
69
 *
70
 * Complete Class Desc
71
 *
72
 * @author <a href="mailto:deweese@apache.org>deweese</a>
73
 * @version $Id: skel.el,v 1.1 2003/05/13 21:04:46 deweese Exp $
74
 */
75
public class Any2AnyRed extends AbstractRed {
76
77
    ColorSpace srcCS, dstCS;
78
    ColorConvertOp ccop;
79
    /**
80
     * Construct a luminace image from src.
81
     *
82
     * @param src The image to convert to a luminance image
83
     */
84
    public Any2AnyRed(CachableRed src, ColorSpace cs) {
85
        super(src,src.getBounds(), 
86
              fixColorModel(src, cs),
87
              fixSampleModel(src, cs),
88
              src.getTileGridXOffset(),
89
              src.getTileGridYOffset(),
90
              null);
91
92
        ColorModel srcCM = src.getColorModel();
93
        srcCS = srcCM.getColorSpace();
94
        dstCS = cs;
95
        ccop = new ColorConvertOp(srcCS, dstCS, null);
96
    }
97
98
    public WritableRaster copyData(WritableRaster wr) {
99
        CachableRed src   = (CachableRed)getSources().get(0);
100
        ColorModel  srcCM  = src.getColorModel();
101
        Raster      srcRas = src.getData(wr.getBounds());
102
        WritableRaster srcWr  = (WritableRaster)srcRas;
103
        int [] bands = {0, 1, 2};
104
        srcWr = srcWr.createWritableChild
105
            (srcWr.getMinX(), srcWr.getMinY(), 
106
             srcWr.getWidth(), srcWr.getHeight(), 0, 0, bands);
107
108
        WritableRaster wr00 = wr.createWritableChild
109
            (wr.getMinX(), wr.getMinY(), 
110
             wr.getWidth(), wr.getHeight(), 0, 0, bands);
111
        GraphicsUtil.coerceData(srcWr, srcCM, false);
112
113
        ccop.filter(srcWr, wr00);
114
115
        if (getColorModel().hasAlpha()) {
116
            SampleModel srcSM = src.getSampleModel();
117
            copyBand(srcRas, srcRas.getNumBands()-1,
118
                     wr,     wr.getNumBands()-1);
119
        }
120
        return wr;
121
    }
122
        /**
123
         * This function 'fixes' the source's color model.  Right now
124
         * it just selects if it should have one or two bands based on
125
         * if the source had an alpha channel.
126
         */
127
    protected static ColorModel fixColorModel(CachableRed src,
128
                                              ColorSpace cs) {
129
        ColorModel  cm = src.getColorModel();
130
        if (cm.hasAlpha())
131
            return new ComponentColorModel(cs, true, false, 
132
                                           Transparency.TRANSLUCENT,
133
                                           DataBuffer.TYPE_BYTE);
134
        
135
        return new ComponentColorModel(cs, false, false, 
136
                                       Transparency.TRANSLUCENT,
137
                                       DataBuffer.TYPE_BYTE);
138
    }
139
140
    /**
141
     * This function 'fixes' the source's sample model.
142
     * Right now it just selects if it should have 3 or 4 bands
143
     * based on if the source had an alpha channel.
144
     */
145
    protected static SampleModel fixSampleModel(CachableRed src, 
146
                                                ColorSpace cs) {
147
        SampleModel sm = src.getSampleModel();
148
        ColorModel  cm = src.getColorModel();
149
150
        int bands = cs.getNumComponents();
151
        if (cm.hasAlpha())
152
            bands++;
153
154
        int [] offsets = new int[bands];
155
        for (int i=0; i<bands; i++)
156
            offsets[i] = i;
157
158
        return new ComponentSampleModel
159
            (DataBuffer.TYPE_BYTE, sm.getWidth(), sm.getHeight(),
160
             bands, bands*sm.getWidth(), offsets);
161
    }
162
163
164
}
(-)sources/org/apache/batik/ext/awt/image/rendered/DiffuseLightingRed.java (-5 / +6 lines)
Lines 51-56 Link Here
51
package org.apache.batik.ext.awt.image.rendered;
51
package org.apache.batik.ext.awt.image.rendered;
52
52
53
import java.awt.Rectangle;
53
import java.awt.Rectangle;
54
import java.awt.color.ColorSpace;
54
import java.awt.image.ColorModel;
55
import java.awt.image.ColorModel;
55
import java.awt.image.DataBufferInt;
56
import java.awt.image.DataBufferInt;
56
import java.awt.image.SampleModel;
57
import java.awt.image.SampleModel;
Lines 95-101 Link Here
95
    /**
96
    /**
96
     * true if calculations should be performed in linear sRGB
97
     * true if calculations should be performed in linear sRGB
97
     */
98
     */
98
    private boolean linear;
99
    private ColorSpace colorSpace;
99
100
100
101
101
    public DiffuseLightingRed(double kd,
102
    public DiffuseLightingRed(double kd,
Lines 103-119 Link Here
103
                              BumpMap bumpMap,
104
                              BumpMap bumpMap,
104
                              Rectangle litRegion,
105
                              Rectangle litRegion,
105
                              double scaleX, double scaleY,
106
                              double scaleX, double scaleY,
106
                              boolean linear){
107
                              ColorSpace colorSpace){
107
        this.kd = kd;
108
        this.kd = kd;
108
        this.light = light;
109
        this.light = light;
109
        this.bumpMap = bumpMap;
110
        this.bumpMap = bumpMap;
110
        this.litRegion = litRegion;
111
        this.litRegion = litRegion;
111
        this.scaleX = scaleX;
112
        this.scaleX = scaleX;
112
        this.scaleY = scaleY;
113
        this.scaleY = scaleY;
113
        this.linear = linear;
114
        this.colorSpace = colorSpace;
114
115
115
        ColorModel cm;
116
        ColorModel cm;
116
        if (linear)
117
        if (true)
117
            cm = GraphicsUtil.Linear_sRGB_Pre;
118
            cm = GraphicsUtil.Linear_sRGB_Pre;
118
        else
119
        else
119
            cm = GraphicsUtil.sRGB_Pre;
120
            cm = GraphicsUtil.sRGB_Pre;
Lines 127-133 Link Here
127
    }
128
    }
128
129
129
    public WritableRaster copyData(WritableRaster wr){
130
    public WritableRaster copyData(WritableRaster wr){
130
        final double[] lightColor = light.getColor(linear);
131
        final double[] lightColor = light.getColor(true);
131
        
132
        
132
        final int w = wr.getWidth();
133
        final int w = wr.getWidth();
133
        final int h = wr.getHeight();
134
        final int h = wr.getHeight();
(-)sources/org/apache/batik/ext/awt/image/rendered/GaussianBlurRed8Bit.java (+8 lines)
Lines 266-271 Link Here
266
        if (srcCM.hasAlpha() && !srcCM.isAlphaPremultiplied()) 
266
        if (srcCM.hasAlpha() && !srcCM.isAlphaPremultiplied()) 
267
            GraphicsUtil.coerceData(tmpR1, srcCM, true);
267
            GraphicsUtil.coerceData(tmpR1, srcCM, true);
268
268
269
        if (!getColorModel().isCompatibleRaster(tmpR1)) {
270
            WritableRaster local;
271
            local = getColorModel().createCompatibleWritableRaster
272
                (tmpR1.getWidth(), tmpR1.getHeight());
273
            GraphicsUtil.copyData(tmpR1, local);
274
            tmpR1 = local;
275
        }
276
269
        // For the blur box approx we can use dest as our intermediate
277
        // For the blur box approx we can use dest as our intermediate
270
        // otherwise we let it default to null which means we create a new
278
        // otherwise we let it default to null which means we create a new
271
        // one...
279
        // one...
(-)sources/org/apache/batik/ext/awt/image/rendered/ProfileRed.java (-6 / +2 lines)
Lines 67-75 Link Here
67
import java.awt.image.RenderedImage;
67
import java.awt.image.RenderedImage;
68
import java.awt.image.WritableRaster;
68
import java.awt.image.WritableRaster;
69
69
70
import org.apache.batik.ext.awt.color.ICCColorSpaceExt;
71
72
73
/**
70
/**
74
 * This implementation of rendered image forces a color profile
71
 * This implementation of rendered image forces a color profile
75
 * on its source
72
 * on its source
Lines 90-96 Link Here
90
                               false,
87
                               false,
91
                               DataBuffer.TYPE_INT);
88
                               DataBuffer.TYPE_INT);
92
89
93
    private ICCColorSpaceExt colorSpace;
90
    private ColorSpace colorSpace;
94
91
95
    /**
92
    /**
96
     * @param src Images on which the input ColorSpace should
93
     * @param src Images on which the input ColorSpace should
Lines 98-105 Link Here
98
     * @param colorSpace colorSpace that should be forced on the
95
     * @param colorSpace colorSpace that should be forced on the
99
     *        source
96
     *        source
100
     */
97
     */
101
    public ProfileRed(CachableRed src,
98
    public ProfileRed(CachableRed src, ColorSpace colorSpace){
102
                      ICCColorSpaceExt colorSpace){
103
        this.colorSpace = colorSpace;
99
        this.colorSpace = colorSpace;
104
100
105
        init(src, src.getBounds(), 
101
        init(src, src.getBounds(), 
(-)sources/org/apache/batik/ext/awt/image/rendered/SpecularLightingRed.java (-5 / +6 lines)
Lines 51-56 Link Here
51
package org.apache.batik.ext.awt.image.rendered;
51
package org.apache.batik.ext.awt.image.rendered;
52
52
53
import java.awt.Rectangle;
53
import java.awt.Rectangle;
54
import java.awt.color.ColorSpace;
54
import java.awt.image.ColorModel;
55
import java.awt.image.ColorModel;
55
import java.awt.image.DataBufferInt;
56
import java.awt.image.DataBufferInt;
56
import java.awt.image.SampleModel;
57
import java.awt.image.SampleModel;
Lines 100-106 Link Here
100
    /**
101
    /**
101
     * true if calculations should be performed in linear sRGB
102
     * true if calculations should be performed in linear sRGB
102
     */
103
     */
103
    private boolean linear;
104
    private ColorSpace colorSpace;
104
     
105
     
105
106
106
    public SpecularLightingRed(double ks,
107
    public SpecularLightingRed(double ks,
Lines 109-115 Link Here
109
                               BumpMap bumpMap,
110
                               BumpMap bumpMap,
110
                               Rectangle litRegion,
111
                               Rectangle litRegion,
111
                               double scaleX, double scaleY,
112
                               double scaleX, double scaleY,
112
                               boolean linear) {
113
                               ColorSpace colorSpace) {
113
        this.ks = ks;
114
        this.ks = ks;
114
        this.specularExponent = specularExponent;
115
        this.specularExponent = specularExponent;
115
        this.light = light;
116
        this.light = light;
Lines 117-126 Link Here
117
        this.litRegion = litRegion;
118
        this.litRegion = litRegion;
118
        this.scaleX = scaleX;
119
        this.scaleX = scaleX;
119
        this.scaleY = scaleY;
120
        this.scaleY = scaleY;
120
        this.linear = linear;
121
        this.colorSpace = colorSpace;
121
122
122
        ColorModel cm;
123
        ColorModel cm;
123
        if (linear)
124
        if (true)
124
            cm = GraphicsUtil.Linear_sRGB_Unpre;
125
            cm = GraphicsUtil.Linear_sRGB_Unpre;
125
        else
126
        else
126
            cm = GraphicsUtil.sRGB_Unpre;
127
            cm = GraphicsUtil.sRGB_Unpre;
Lines 146-152 Link Here
146
        final double scaleX = this.scaleX;
147
        final double scaleX = this.scaleX;
147
        final double scaleY = this.scaleY;
148
        final double scaleY = this.scaleY;
148
149
149
        final double[] lightColor = light.getColor(linear);
150
        final double[] lightColor = light.getColor(true);
150
151
151
        final int w = wr.getWidth();
152
        final int w = wr.getWidth();
152
        final int h = wr.getHeight();
153
        final int h = wr.getHeight();
(-)sources/org/apache/batik/ext/awt/image/rendered/TileRed.java (-1 / +2 lines)
Lines 256-262 Link Here
256
                                wr.createWritableTranslatedChild(0, 0),
256
                                wr.createWritableTranslatedChild(0, 0),
257
                                cm.isAlphaPremultiplied(), null);
257
                                cm.isAlphaPremultiplied(), null);
258
258
259
        Graphics2D g = GraphicsUtil.createGraphics(bi, hints);
259
        Graphics2D g = GraphicsUtil.createGraphics
260
            (bi, cm.getColorSpace(), hints);
260
261
261
        int minX = wr.getMinX();
262
        int minX = wr.getMinX();
262
        int minY = wr.getMinY();
263
        int minY = wr.getMinY();
(-)sources/org/apache/batik/ext/awt/image/spi/ImageTagRegistry.java (-5 / +5 lines)
Lines 50-55 Link Here
50
50
51
package org.apache.batik.ext.awt.image.spi;
51
package org.apache.batik.ext.awt.image.spi;
52
52
53
import java.awt.color.ColorSpace;
53
import java.io.BufferedInputStream;
54
import java.io.BufferedInputStream;
54
import java.io.IOException;
55
import java.io.IOException;
55
import java.io.InputStream;
56
import java.io.InputStream;
Lines 60-66 Link Here
60
import java.util.List;
61
import java.util.List;
61
import java.util.ListIterator;
62
import java.util.ListIterator;
62
63
63
import org.apache.batik.ext.awt.color.ICCColorSpaceExt;
64
import org.apache.batik.ext.awt.image.URLImageCache;
64
import org.apache.batik.ext.awt.image.URLImageCache;
65
import org.apache.batik.ext.awt.image.renderable.Filter;
65
import org.apache.batik.ext.awt.image.renderable.Filter;
66
import org.apache.batik.ext.awt.image.renderable.ProfileRable;
66
import org.apache.batik.ext.awt.image.renderable.ProfileRable;
Lines 103-109 Link Here
103
        imgCache.flush();
103
        imgCache.flush();
104
    }
104
    }
105
105
106
    public Filter checkCache(ParsedURL purl, ICCColorSpaceExt colorSpace) {
106
    public Filter checkCache(ParsedURL purl, ColorSpace colorSpace) {
107
        // I just realized that this whole thing could 
107
        // I just realized that this whole thing could 
108
        boolean needRawData = (colorSpace != null);
108
        boolean needRawData = (colorSpace != null);
109
109
Lines 128-139 Link Here
128
        return readURL(null, purl, null, true, true);
128
        return readURL(null, purl, null, true, true);
129
    }
129
    }
130
130
131
    public Filter readURL(ParsedURL purl, ICCColorSpaceExt colorSpace) {
131
    public Filter readURL(ParsedURL purl, ColorSpace colorSpace) {
132
        return readURL(null, purl, colorSpace, true, true);
132
        return readURL(null, purl, colorSpace, true, true);
133
    }
133
    }
134
134
135
    public Filter readURL(InputStream is, ParsedURL purl, 
135
    public Filter readURL(InputStream is, ParsedURL purl, 
136
                          ICCColorSpaceExt colorSpace,
136
                          ColorSpace colorSpace,
137
                          boolean allowOpenStream,
137
                          boolean allowOpenStream,
138
                          boolean returnBrokenLink) {
138
                          boolean returnBrokenLink) {
139
        if ((is != null) && !is.markSupported())
139
        if ((is != null) && !is.markSupported())
Lines 253-259 Link Here
253
        return readStream(is, null);
253
        return readStream(is, null);
254
    }
254
    }
255
255
256
    public Filter readStream(InputStream is, ICCColorSpaceExt colorSpace) {
256
    public Filter readStream(InputStream is, ColorSpace colorSpace) {
257
        if (!is.markSupported())
257
        if (!is.markSupported())
258
            // Doesn't support mark so wrap with BufferedInputStream that does.
258
            // Doesn't support mark so wrap with BufferedInputStream that does.
259
            is = new BufferedInputStream(is);
259
            is = new BufferedInputStream(is);
(-)sources/org/apache/batik/extension/svg/BatikHistogramNormalizationElementBridge.java (-1 / +1 lines)
Lines 181-187 Link Here
181
        updateFilterMap(filterElement, filter, filterMap);
181
        updateFilterMap(filterElement, filter, filterMap);
182
182
183
        // handle the 'color-interpolation-filters' property
183
        // handle the 'color-interpolation-filters' property
184
        handleColorInterpolationFilters(filter, filterElement);
184
        handleColorInterpolationFilters(filter, filterElement, ctx);
185
185
186
        return filter;
186
        return filter;
187
    }
187
    }
(-)sources/org/apache/batik/extension/svg/SolidColorBridge.java (-3 / +7 lines)
Lines 52-57 Link Here
52
52
53
import java.awt.Color;
53
import java.awt.Color;
54
import java.awt.Paint;
54
import java.awt.Paint;
55
import java.awt.color.ColorSpace;
55
import java.util.HashMap;
56
import java.util.HashMap;
56
import java.util.Map;
57
import java.util.Map;
57
58
Lines 120-126 Link Here
120
121
121
        opacity = extractOpacity(paintElement, opacity, ctx);
122
        opacity = extractOpacity(paintElement, opacity, ctx);
122
123
123
        return extractColor(paintElement, opacity, ctx);
124
        return extractColor(paintElement, paintedNode.getColorSpace(), 
125
                            opacity, ctx);
124
    }
126
    }
125
127
126
    protected static float extractOpacity(Element paintElement, 
128
    protected static float extractOpacity(Element paintElement, 
Lines 163-168 Link Here
163
    }
165
    }
164
166
165
    protected static Color extractColor(Element paintElement, 
167
    protected static Color extractColor(Element paintElement, 
168
                                        ColorSpace colorSpace,
166
                                        float opacity,
169
                                        float opacity,
167
                                        BridgeContext ctx) {
170
                                        BridgeContext ctx) {
168
        Map refs = new HashMap();
171
        Map refs = new HashMap();
Lines 180-189 Link Here
180
                // It was explicit...
183
                // It was explicit...
181
                if (colorDef.getCssValueType() ==
184
                if (colorDef.getCssValueType() ==
182
                    CSSValue.CSS_PRIMITIVE_VALUE) {
185
                    CSSValue.CSS_PRIMITIVE_VALUE) {
183
                    return PaintServer.convertColor(colorDef, opacity);
186
                    return PaintServer.convertColor
187
                        (colorSpace, colorDef, opacity);
184
                } else {
188
                } else {
185
                    return PaintServer.convertRGBICCColor
189
                    return PaintServer.convertRGBICCColor
186
                        (paintElement, colorDef.item(0),
190
                        (paintElement, colorSpace, colorDef.item(0),
187
                         (ICCColor)colorDef.item(1),
191
                         (ICCColor)colorDef.item(1),
188
                         opacity, ctx);
192
                         opacity, ctx);
189
                }
193
                }
(-)sources/org/apache/batik/gvt/AbstractGraphicsNode.java (-4 / +34 lines)
Lines 55-60 Link Here
55
import java.awt.Graphics2D;
55
import java.awt.Graphics2D;
56
import java.awt.RenderingHints;
56
import java.awt.RenderingHints;
57
import java.awt.Shape;
57
import java.awt.Shape;
58
import java.awt.color.ColorSpace;
58
import java.awt.geom.AffineTransform;
59
import java.awt.geom.AffineTransform;
59
import java.awt.geom.NoninvertibleTransformException;
60
import java.awt.geom.NoninvertibleTransformException;
60
import java.awt.geom.Point2D;
61
import java.awt.geom.Point2D;
Lines 67-72 Link Here
67
import javax.swing.event.EventListenerList;
68
import javax.swing.event.EventListenerList;
68
69
69
import org.apache.batik.ext.awt.RenderingHintsKeyExt;
70
import org.apache.batik.ext.awt.RenderingHintsKeyExt;
71
import org.apache.batik.ext.awt.image.GraphicsUtil;
70
import org.apache.batik.ext.awt.image.renderable.ClipRable;
72
import org.apache.batik.ext.awt.image.renderable.ClipRable;
71
import org.apache.batik.ext.awt.image.renderable.Filter;
73
import org.apache.batik.ext.awt.image.renderable.Filter;
72
import org.apache.batik.gvt.event.GraphicsNodeChangeEvent;
74
import org.apache.batik.gvt.event.GraphicsNodeChangeEvent;
Lines 74-80 Link Here
74
import org.apache.batik.gvt.filter.GraphicsNodeRable;
76
import org.apache.batik.gvt.filter.GraphicsNodeRable;
75
import org.apache.batik.gvt.filter.GraphicsNodeRable8Bit;
77
import org.apache.batik.gvt.filter.GraphicsNodeRable8Bit;
76
import org.apache.batik.gvt.filter.Mask;
78
import org.apache.batik.gvt.filter.Mask;
77
78
/**
79
/**
79
 * A partial implementation of the <tt>GraphicsNode</tt> interface.
80
 * A partial implementation of the <tt>GraphicsNode</tt> interface.
80
 *
81
 *
Lines 149-154 Link Here
149
    protected int pointerEventType = VISIBLE_PAINTED;
150
    protected int pointerEventType = VISIBLE_PAINTED;
150
151
151
    /**
152
    /**
153
     * Stores the colorspace for rendering this element.
154
     */
155
    protected ColorSpace colorSpace;
156
157
    /**
152
     * The GraphicsNodeRable for this node.
158
     * The GraphicsNodeRable for this node.
153
     */
159
     */
154
    protected WeakReference graphicsNodeRable;
160
    protected WeakReference graphicsNodeRable;
Lines 445-450 Link Here
445
        return ret;
451
        return ret;
446
    }
452
    }
447
453
454
    /**
455
     * Set the Colorspace for rendering this node.
456
     */
457
    public void setColorSpace(ColorSpace cs) {
458
        fireGraphicsNodeChangeStarted();
459
        this.colorSpace = cs;
460
        fireGraphicsNodeChangeCompleted();
461
    }
462
463
    /**
464
     * Get the Colorspace for rendering this node.
465
     */
466
    public ColorSpace getColorSpace() {
467
        return colorSpace;
468
    }
469
448
    //
470
    //
449
    // Drawing methods
471
    // Drawing methods
450
    //
472
    //
Lines 518-525 Link Here
518
            }
540
            }
519
541
520
            boolean useOffscreen = isOffscreenBufferNeeded();
542
            boolean useOffscreen = isOffscreenBufferNeeded();
521
522
            useOffscreen |= antialiasedClip;
543
            useOffscreen |= antialiasedClip;
544
            if (parent != null) {
545
                if ((getColorSpace() != null) && 
546
                    (parent.getColorSpace() != getColorSpace())) {
547
                    useOffscreen = true;
548
                }
549
            } else {
550
                ColorSpace g2dCS = GraphicsUtil.getDestinationColorSpace(g2d);
551
                if (!getColorSpace().equals(g2dCS))
552
                    useOffscreen = true;
553
            }
523
554
524
            if (!useOffscreen) {
555
            if (!useOffscreen) {
525
                // Render on this canvas.
556
                // Render on this canvas.
Lines 557-564 Link Here
557
                Rectangle2D filterBounds = filteredImage.getBounds2D();
588
                Rectangle2D filterBounds = filteredImage.getBounds2D();
558
                g2d.clip(filterBounds);
589
                g2d.clip(filterBounds);
559
590
560
                org.apache.batik.ext.awt.image.GraphicsUtil.drawImage
591
                GraphicsUtil.drawImage(g2d, filteredImage);
561
                    (g2d, filteredImage);
562
            }
592
            }
563
        }
593
        }
564
594
(-)sources/org/apache/batik/gvt/GraphicsNode.java (+12 lines)
Lines 54-59 Link Here
54
import java.awt.Graphics2D;
54
import java.awt.Graphics2D;
55
import java.awt.RenderingHints;
55
import java.awt.RenderingHints;
56
import java.awt.Shape;
56
import java.awt.Shape;
57
import java.awt.color.ColorSpace;
57
import java.awt.geom.AffineTransform;
58
import java.awt.geom.AffineTransform;
58
import java.awt.geom.Point2D;
59
import java.awt.geom.Point2D;
59
import java.awt.geom.Rectangle2D;
60
import java.awt.geom.Rectangle2D;
Lines 285-290 Link Here
285
     * filter operations have been applied.  
286
     * filter operations have been applied.  
286
     */
287
     */
287
    Filter getEnableBackgroundGraphicsNodeRable(boolean createIfNeeded);
288
    Filter getEnableBackgroundGraphicsNodeRable(boolean createIfNeeded);
289
290
291
    /**
292
     * Set the Colorspace for rendering this node.
293
     */
294
    void setColorSpace(ColorSpace cs);
295
296
    /**
297
     * Get the Colorspace for rendering this node.
298
     */
299
    ColorSpace getColorSpace();
288
300
289
    //
301
    //
290
    // Drawing methods
302
    // Drawing methods
(-)sources/org/apache/batik/gvt/PatternPaint.java (-5 / +11 lines)
Lines 54-59 Link Here
54
import java.awt.PaintContext;
54
import java.awt.PaintContext;
55
import java.awt.Rectangle;
55
import java.awt.Rectangle;
56
import java.awt.RenderingHints;
56
import java.awt.RenderingHints;
57
import java.awt.color.ColorSpace;
57
import java.awt.geom.AffineTransform;
58
import java.awt.geom.AffineTransform;
58
import java.awt.geom.Rectangle2D;
59
import java.awt.geom.Rectangle2D;
59
import java.awt.image.ColorModel;
60
import java.awt.image.ColorModel;
Lines 102-107 Link Here
102
     */
103
     */
103
    private boolean overflow;
104
    private boolean overflow;
104
105
106
    /**
107
     * Stores the destination colorspace for this paint.
108
     */
109
    private ColorSpace colorSpace;
110
105
    private PatternPaintContext lastContext;
111
    private PatternPaintContext lastContext;
106
112
107
    /**
113
    /**
Lines 116-124 Link Here
116
     */
122
     */
117
    public PatternPaint(GraphicsNode node,
123
    public PatternPaint(GraphicsNode node,
118
                        Rectangle2D patternRegion,
124
                        Rectangle2D patternRegion,
125
                        ColorSpace colorSpace,
119
                        boolean overflow,
126
                        boolean overflow,
120
                        AffineTransform patternTransform){
127
                        AffineTransform patternTransform){
121
122
        if (node == null) {
128
        if (node == null) {
123
            throw new IllegalArgumentException();
129
            throw new IllegalArgumentException();
124
        }
130
        }
Lines 129-134 Link Here
129
135
130
        this.node             = node;
136
        this.node             = node;
131
        this.patternRegion    = patternRegion;
137
        this.patternRegion    = patternRegion;
138
        this.colorSpace       = colorSpace;
132
        this.overflow         = overflow;
139
        this.overflow         = overflow;
133
        this.patternTransform = patternTransform;
140
        this.patternTransform = patternTransform;
134
        
141
        
Lines 212-221 Link Here
212
        // System.out.println("CM : " + cm);
219
        // System.out.println("CM : " + cm);
213
        // System.out.println("xForm : " + xform);
220
        // System.out.println("xForm : " + xform);
214
        
221
        
215
        lastContext = new PatternPaintContext(cm, xform,
222
        lastContext = new PatternPaintContext(cm, colorSpace, 
216
                                       hints, tile,
223
                                              xform, hints, tile,
217
                                       patternRegion,
224
                                              patternRegion, overflow);
218
                                       overflow);
219
        return lastContext;
225
        return lastContext;
220
    }
226
    }
221
227
(-)sources/org/apache/batik/gvt/PatternPaintContext.java (-5 / +2 lines)
Lines 110-115 Link Here
110
     *                   pattern tile
110
     *                   pattern tile
111
     */
111
     */
112
    public PatternPaintContext(ColorModel      destCM,
112
    public PatternPaintContext(ColorModel      destCM,
113
                               ColorSpace      destCS,
113
                               AffineTransform usr2dev,
114
                               AffineTransform usr2dev,
114
                               RenderingHints  hints,
115
                               RenderingHints  hints,
115
                               Filter          tile,
116
                               Filter          tile,
Lines 137-147 Link Here
137
                                                EVERYTHING,
138
                                                EVERYTHING,
138
                                                patternRegion,
139
                                                patternRegion,
139
                                                overflow);
140
                                                overflow);
140
        ColorSpace destCS = destCM.getColorSpace();
141
        tileRable.setOperationColorSpace(destCS);
141
        if (destCS == ColorSpace.getInstance(ColorSpace.CS_sRGB))
142
            tileRable.setColorSpaceLinear(false);
143
        else if (destCS == ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB))
144
            tileRable.setColorSpaceLinear(true);
145
142
146
        RenderContext rc = new RenderContext(usr2dev,  EVERYTHING, hints);
143
        RenderContext rc = new RenderContext(usr2dev,  EVERYTHING, hints);
147
        tiled = tileRable.createRendering(rc);
144
        tiled = tileRable.createRendering(rc);
(-)sources/org/apache/batik/gvt/filter/BackgroundRable8Bit.java (-2 / +7 lines)
Lines 66-71 Link Here
66
import org.apache.batik.ext.awt.image.renderable.AffineRable8Bit;
66
import org.apache.batik.ext.awt.image.renderable.AffineRable8Bit;
67
import org.apache.batik.ext.awt.image.renderable.CompositeRable8Bit;
67
import org.apache.batik.ext.awt.image.renderable.CompositeRable8Bit;
68
import org.apache.batik.ext.awt.image.renderable.Filter;
68
import org.apache.batik.ext.awt.image.renderable.Filter;
69
import org.apache.batik.ext.awt.image.renderable.FilterColorInterpolation;
69
import org.apache.batik.ext.awt.image.renderable.PadRable8Bit;
70
import org.apache.batik.ext.awt.image.renderable.PadRable8Bit;
70
import org.apache.batik.gvt.CompositeGraphicsNode;
71
import org.apache.batik.gvt.CompositeGraphicsNode;
71
import org.apache.batik.gvt.GraphicsNode;
72
import org.apache.batik.gvt.GraphicsNode;
Lines 355-362 Link Here
355
        Filter ret = null;
356
        Filter ret = null;
356
        if (srcs.size() == 1)
357
        if (srcs.size() == 1)
357
            ret = (Filter)srcs.get(0);
358
            ret = (Filter)srcs.get(0);
358
        else
359
        else {
359
            ret = new CompositeRable8Bit(srcs, CompositeRule.OVER, false);
360
            FilterColorInterpolation f;
361
            f = new CompositeRable8Bit(srcs, CompositeRule.OVER);
362
            f.setOperationColorSpace(gn.getColorSpace());
363
            ret = f;
364
        }
360
365
361
        if (child != null) {
366
        if (child != null) {
362
            // We are returning the filter to child so make
367
            // We are returning the filter to child so make
(-)sources/org/apache/batik/gvt/filter/GraphicsNodeRable8Bit.java (-44 / +44 lines)
Lines 84-89 Link Here
84
    private AffineTransform cachedUsr2dev  = null;
84
    private AffineTransform cachedUsr2dev  = null;
85
    private CachableRed     cachedRed      = null;
85
    private CachableRed     cachedRed      = null;
86
    private Rectangle2D     cachedBounds = null;
86
    private Rectangle2D     cachedBounds = null;
87
88
    /**
89
     * @param node The GraphicsNode this image should represent
90
     */
91
    public GraphicsNodeRable8Bit(GraphicsNode node){
92
        if(node == null)
93
            throw new IllegalArgumentException();
94
95
        this.node              = node;
96
        this.usePrimitivePaint = true;
97
    }
98
99
    /**
100
     * @param node The GraphicsNode this image should represent
101
     * @param props The Properties for this image.
102
     */
103
    public GraphicsNodeRable8Bit(GraphicsNode node,
104
                                 Map props){
105
        super((Filter)null, props);
106
107
        if(node == null)
108
            throw new IllegalArgumentException();
109
110
        this.node              = node;
111
        this.usePrimitivePaint = true;
112
    }
113
114
    /**
115
     * @param node      the GraphicsNode this image should represent
116
     * @param usePrimitivePaint indicates if the image should
117
     *        include any filters or mask operations on <tt>node</tt>
118
     */
119
    public GraphicsNodeRable8Bit(GraphicsNode node, 
120
                                 boolean      usePrimitivePaint){
121
        if(node == null)
122
            throw new IllegalArgumentException();
123
124
        this.node              = node;
125
        this.usePrimitivePaint = usePrimitivePaint;
126
    }
127
87
    /**
128
    /**
88
     * Should GraphicsNodeRable call primitivePaint or Paint.
129
     * Should GraphicsNodeRable call primitivePaint or Paint.
89
     */
130
     */
Lines 141-186 Link Here
141
    }
182
    }
142
183
143
    /**
184
    /**
144
     * @param node The GraphicsNode this image should represent
145
     */
146
    public GraphicsNodeRable8Bit(GraphicsNode node){
147
        if(node == null)
148
            throw new IllegalArgumentException();
149
150
        this.node = node;
151
        this.usePrimitivePaint = true;
152
    }
153
154
    /**
155
     * @param node The GraphicsNode this image should represent
156
     * @param props The Properties for this image.
157
     */
158
    public GraphicsNodeRable8Bit(GraphicsNode node,
159
                                 Map props){
160
        super((Filter)null, props);
161
162
        if(node == null)
163
            throw new IllegalArgumentException();
164
165
        this.node = node;
166
        this.usePrimitivePaint = true;
167
    }
168
169
    /**
170
     * @param node      the GraphicsNode this image should represent
171
     * @param usePrimitivePaint indicates if the image should
172
     *        include any filters or mask operations on <tt>node</tt>
173
     */
174
    public GraphicsNodeRable8Bit(GraphicsNode node, 
175
                                 boolean      usePrimitivePaint){
176
        if(node == null)
177
            throw new IllegalArgumentException();
178
179
        this.node = node;
180
        this.usePrimitivePaint = usePrimitivePaint;
181
    }
182
183
    /**
184
     * Returns the bounds of this Rable in the user coordinate system.
185
     * Returns the bounds of this Rable in the user coordinate system.
185
     */
186
     */
186
    public Rectangle2D getBounds2D(){
187
    public Rectangle2D getBounds2D(){
Lines 237-251 Link Here
237
        if (!SVGComposite.OVER.equals(c))
238
        if (!SVGComposite.OVER.equals(c))
238
            return false;
239
            return false;
239
        
240
        
241
        GraphicsNode gn = getGraphicsNode();
240
        ColorSpace g2dCS = GraphicsUtil.getDestinationColorSpace(g2d);
242
        ColorSpace g2dCS = GraphicsUtil.getDestinationColorSpace(g2d);
241
        if ((g2dCS == null) ||
243
        if ((g2dCS == null) || (g2dCS != gn.getColorSpace())){
242
            (g2dCS != ColorSpace.getInstance(ColorSpace.CS_sRGB))){
244
            // Only draw directly into destinations that match!
243
            // Only draw directly into sRGB destinations...
244
            return false;
245
            return false;
245
        }
246
        }
246
247
247
        // System.out.println("drawImage GNR: " + g2dCS);
248
        // System.out.println("drawImage GNR: " + g2dCS);
248
        GraphicsNode gn = getGraphicsNode();
249
        if (getUsePrimitivePaint()){
249
        if (getUsePrimitivePaint()){
250
            gn.primitivePaint(g2d);
250
            gn.primitivePaint(g2d);
251
        }
251
        }
(-)sources/org/apache/batik/gvt/filter/GraphicsNodeRed8Bit.java (-4 / +165 lines)
Lines 54-63 Link Here
54
import java.awt.Graphics2D;
54
import java.awt.Graphics2D;
55
import java.awt.Rectangle;
55
import java.awt.Rectangle;
56
import java.awt.RenderingHints;
56
import java.awt.RenderingHints;
57
import java.awt.Transparency;
58
import java.awt.color.ColorSpace;
57
import java.awt.geom.AffineTransform;
59
import java.awt.geom.AffineTransform;
58
import java.awt.geom.Rectangle2D;
60
import java.awt.geom.Rectangle2D;
59
import java.awt.image.BufferedImage;
61
import java.awt.image.BufferedImage;
60
import java.awt.image.ColorModel;
62
import java.awt.image.ColorModel;
63
import java.awt.image.DataBuffer;
64
import java.awt.image.DirectColorModel;
65
import java.awt.image.ComponentColorModel;
66
import java.awt.image.PackedColorModel;
61
import java.awt.image.SampleModel;
67
import java.awt.image.SampleModel;
62
import java.awt.image.WritableRaster;
68
import java.awt.image.WritableRaster;
63
69
Lines 87-92 Link Here
87
93
88
    private boolean usePrimitivePaint;
94
    private boolean usePrimitivePaint;
89
95
96
    private ColorSpace      colorSpace;
97
90
    public GraphicsNodeRed8Bit(GraphicsNode node,
98
    public GraphicsNodeRed8Bit(GraphicsNode node,
91
                               AffineTransform node2dev,
99
                               AffineTransform node2dev,
92
                               boolean usePrimitivePaint,
100
                               boolean usePrimitivePaint,
Lines 120-126 Link Here
120
        Rectangle   bounds = at.createTransformedShape(bounds2D).getBounds();
128
        Rectangle   bounds = at.createTransformedShape(bounds2D).getBounds();
121
        // System.out.println("Bounds: " + bounds);
129
        // System.out.println("Bounds: " + bounds);
122
130
123
        ColorModel cm = GraphicsUtil.sRGB_Unpre;
131
        colorSpace = node.getColorSpace();
132
        if (colorSpace == null)
133
            colorSpace = ColorSpace.getInstance(ColorSpace.CS_sRGB);
134
135
        ColorModel cm;
136
        if      (colorSpace == ColorSpace.getInstance(ColorSpace.CS_sRGB))
137
            cm = GraphicsUtil.sRGB_Unpre;
138
        else {
139
            cm = new ComponentColorModel(colorSpace, true, false, 
140
                                         Transparency.TRANSLUCENT,
141
                                         DataBuffer.TYPE_BYTE);
142
        }
124
143
125
        int defSz = AbstractTiledRed.getDefaultTileSize();
144
        int defSz = AbstractTiledRed.getDefaultTileSize();
126
145
Lines 149-163 Link Here
149
        return wr;
168
        return wr;
150
    }
169
    }
151
170
152
    public void genRect(WritableRaster wr) {
171
    public void genRect(WritableRaster inWR) {
153
        // System.out.println("  Rect: " + wr.getBounds());
172
        // System.out.println("  Rect: " + wr.getBounds());
173
        WritableRaster wr;
174
        if (GraphicsUtil.sRGB_Unpre.isCompatibleRaster(inWR)) {
175
            wr = inWR;
176
        } else {
177
            wr = GraphicsUtil.sRGB_Unpre.createCompatibleWritableRaster
178
                (inWR.getWidth(),
179
                                                   inWR.getHeight());
180
            wr = wr.createWritableTranslatedChild(inWR.getMinX(),
181
                                                  inWR.getMinY());
182
        }
183
154
        BufferedImage offScreen
184
        BufferedImage offScreen
155
            = new BufferedImage(cm, 
185
            = new BufferedImage(GraphicsUtil.sRGB_Unpre, 
156
                                wr.createWritableTranslatedChild(0,0),
186
                                wr.createWritableTranslatedChild(0,0),
157
                                cm.isAlphaPremultiplied(),
187
                                cm.isAlphaPremultiplied(),
158
                                null);
188
                                null);
159
189
160
        Graphics2D g = GraphicsUtil.createGraphics(offScreen, hints);
190
        Graphics2D g = GraphicsUtil.createGraphics(offScreen, 
191
                                                   colorSpace,
192
                                                   hints);
161
        g.setComposite(AlphaComposite.Clear);
193
        g.setComposite(AlphaComposite.Clear);
162
        g.fillRect(0, 0, wr.getWidth(), wr.getHeight());
194
        g.fillRect(0, 0, wr.getWidth(), wr.getHeight());
163
        g.setComposite(AlphaComposite.SrcOver);
195
        g.setComposite(AlphaComposite.SrcOver);
Lines 176-182 Link Here
176
        }
208
        }
177
209
178
        g.dispose();
210
        g.dispose();
211
        if (inWR != wr) {
212
            GraphicsUtil.copyData(wr, inWR);
213
        }
214
    }
215
216
    public static class ICCPackedColorModel extends PackedColorModel {
217
        ICCPackedColorModel(ColorSpace colorSpace, int bits, 
218
                            int []colorMasks, int alphaMask, 
219
                            boolean alphaPre, int trans, int transferType) {
220
            super(colorSpace, bits, colorMasks, alphaMask,
221
                  alphaPre, trans, transferType);
222
        }
223
224
        public int getRed(Object in) {
225
            float [] rgb = _getRGB(in);
226
            return (int)(rgb[0]*255+0.5);
227
        }
228
        public int getGreen(Object in) {
229
            float [] rgb = _getRGB(in);
230
            return (int)(rgb[1]*255+0.5);
231
        }
232
        public int getBlue(Object in) {
233
            float [] rgb = _getRGB(in);
234
            return (int)(rgb[2]*255+0.5);
235
        }
236
        public int getRed(int in) {
237
            float [] rgb = _getRGB(in);
238
            return (int)(rgb[0]*255+0.5);
239
        }
240
        public int getGreen(int in) {
241
            float [] rgb = _getRGB(in);
242
            return (int)(rgb[1]*255+0.5);
179
    }
243
    }
244
        public int getBlue(int in) {
245
            float [] rgb = _getRGB(in);
246
            return (int)(rgb[2]*255+0.5);
247
        }
248
        public int getAlpha(int in) {
249
            return (in >>> 24);
250
        }
251
        public int getAlpha(Object in) {
252
            return ((((int [])in)[0]) >>> 24);
253
        }
254
255
256
        public int getRGB(int pixel) {
257
            float []rgb = _getRGB(pixel);
258
            return ((pixel&0xFF000000)      |
259
                    (((int)rgb[0]*255)<<16) |
260
                    (((int)rgb[1]*255)<<8)  |
261
                    (((int)rgb[2]*255)));
262
        }
263
        public int getRGB(Object in) {
264
            return getRGB(((int [])in)[0]);
265
        }
266
267
        public int[] getComponents(int pix, 
268
                                   int[] components, 
269
                                   int offset) {
270
            if (components == null) 
271
                components = new int [offset+4];
272
            
273
            components[offset]   = ((pix>>16)&0x00FF);
274
            components[offset+1] = ((pix>> 8)&0x00FF);
275
            components[offset+2] = ((pix    )&0x00FF);
276
            components[offset+3] = ((pix>>24)&0x00FF);
277
            return components;
278
        }
279
280
        public int[] getComponents(Object pixel, 
281
                                   int[] components, 
282
                                   int offset) {
283
            return getComponents(((int[])pixel)[0], components, offset);
284
        }        
285
286
        static final int [] componentSz = { 8, 8, 8, 8 };
287
        public int[] getComponentSize() { return componentSz; }
288
        public int getComponentSize(int idx) { return 8; }
289
        
290
        public Object getDataElements(int rgb, Object pixel) {
291
            int [] ret;
292
            if (pixel == null) ret = new int[1];
293
            else               ret = (int[])pixel;
294
            
295
            float [] frgb = {((rgb&0x00FF0000)>>16)/255f,
296
                             ((rgb&0x0000FF00)>> 8)/255f,
297
                             ((rgb&0x000000FF)    )/255f };
298
            float [] abc = getColorSpace().fromRGB(frgb);
299
            ret[0] = ((rgb&0xFF000000)        |
300
                      ((int)(abc[0]*255)<<16) |
301
                      ((int)(abc[1]*255)<< 8) |
302
                      ((int)(abc[2]*255)));
303
            return ret;
304
        }
305
        public Object getDataElements(int[] components, int offset, 
306
                                      Object obj) {
307
            int [] ret;
308
            if (obj == null) ret = new int[1];
309
            else             ret = (int[])obj;
310
            ret[0] = (((components[offset  ]&0xFF)<<16) |
311
                      ((components[offset+1]&0xFF)<<8 ) |
312
                      ((components[offset+2]&0xFF)    ) |
313
                      ((components[offset+3]&0xFF)<<24));
314
            return ret;
315
        }
316
        public boolean isCompatibleRaster(java.awt.image.Raster raster) {
317
            return isCompatibleSampleModel
318
                (raster.getSampleModel());
319
        }
320
321
        protected float [] _getRGB(Object in) {
322
            return _getRGB(((int [])in)[0]);
323
        }
324
325
        protected float [] _getRGB(int in) {
326
            int a = (in & 0x00FF0000)>>>16;
327
            int b = (in & 0x0000FF00)>>>8;
328
            int c = (in & 0x000000FF);
329
            float [] abc = {a/255f, b/255f, c/255f };
330
            return getColorSpace().toRGB(abc);
331
        }
332
    };
333
334
    /*
335
      int [] colorMasks = { 0x00FF0000, 0x0000FF00, 0x000000FF };
336
      cm = new ICCPackedColorModel(colorSpace, 32, colorMasks, 
337
      0xFF000000, false, 
338
      Transparency.TRANSLUCENT,
339
      DataBuffer.TYPE_INT);
340
    */
180
}
341
}
181
342
182
343
(-)sources/org/apache/batik/util/CSSConstants.java (-373 / +376 lines)
Lines 62-447 Link Here
62
    //
62
    //
63
    // The CSS mime-type string.
63
    // The CSS mime-type string.
64
    //
64
    //
65
    String CSS_MIME_TYPE = "text/css";
65
    final static String CSS_MIME_TYPE = "text/css";
66
66
67
    //
67
    //
68
    // The CSS property names.
68
    // The CSS property names.
69
    //
69
    //
70
    String CSS_ALIGNMENT_BASELINE_PROPERTY = "alignment-baseline";
70
    final static String CSS_ALIGNMENT_BASELINE_PROPERTY = "alignment-baseline";
71
    String CSS_BASELINE_SHIFT_PROPERTY = "baseline-shift";
71
    final static String CSS_BASELINE_SHIFT_PROPERTY = "baseline-shift";
72
    String CSS_CLIP_PROPERTY = "clip";
72
    final static String CSS_CLIP_PROPERTY = "clip";
73
    String CSS_CLIP_PATH_PROPERTY = "clip-path";
73
    final static String CSS_CLIP_PATH_PROPERTY = "clip-path";
74
    String CSS_CLIP_RULE_PROPERTY = "clip-rule";
74
    final static String CSS_CLIP_RULE_PROPERTY = "clip-rule";
75
    String CSS_COLOR_PROFILE_PROPERTY = "color-profile";
75
    final static String CSS_COLOR_PROFILE_PROPERTY = "color-profile";
76
    String CSS_COLOR_PROPERTY = "color";
76
    final static String CSS_COLOR_PROPERTY = "color";
77
    String CSS_COLOR_INTERPOLATION_PROPERTY = "color-interpolation";
77
    final static String CSS_COLOR_INTERPOLATION_PROPERTY = "color-interpolation";
78
    String CSS_COLOR_INTERPOLATION_FILTERS_PROPERTY = "color-interpolation-filters";
78
    final static String CSS_COLOR_INTERPOLATION_FILTERS_PROPERTY = "color-interpolation-filters";
79
    String CSS_COLOR_RENDERING_PROPERTY = "color-rendering";
79
    final static String CSS_COLOR_RENDERING_PROPERTY = "color-rendering";
80
    String CSS_CURSOR_PROPERTY = "cursor";
80
    final static String CSS_CURSOR_PROPERTY = "cursor";
81
    String CSS_DIRECTION_PROPERTY = "direction";
81
    final static String CSS_DIRECTION_PROPERTY = "direction";
82
    String CSS_DISPLAY_PROPERTY = "display";
82
    final static String CSS_DISPLAY_PROPERTY = "display";
83
    String CSS_DOMINANT_BASELINE_PROPERTY = "dominant-baseline";
83
    final static String CSS_DOMINANT_BASELINE_PROPERTY = "dominant-baseline";
84
    String CSS_ENABLE_BACKGROUND_PROPERTY = "enable-background";
84
    final static String CSS_ENABLE_BACKGROUND_PROPERTY = "enable-background";
85
    String CSS_FILL_OPACITY_PROPERTY = "fill-opacity";
85
    final static String CSS_FILL_OPACITY_PROPERTY = "fill-opacity";
86
    String CSS_FILL_PROPERTY = "fill";
86
    final static String CSS_FILL_PROPERTY = "fill";
87
    String CSS_FILL_RULE_PROPERTY = "fill-rule";
87
    final static String CSS_FILL_RULE_PROPERTY = "fill-rule";
88
    String CSS_FILTER_PROPERTY = "filter";
88
    final static String CSS_FILTER_PROPERTY = "filter";
89
    String CSS_FLOOD_COLOR_PROPERTY = "flood-color";
89
    final static String CSS_FLOOD_COLOR_PROPERTY = "flood-color";
90
    String CSS_FLOOD_OPACITY_PROPERTY = "flood-opacity";
90
    final static String CSS_FLOOD_OPACITY_PROPERTY = "flood-opacity";
91
    String CSS_FONT_PROPERTY = "font";
91
    final static String CSS_FONT_PROPERTY = "font";
92
    String CSS_FONT_FAMILY_PROPERTY = "font-family";
92
    final static String CSS_FONT_FAMILY_PROPERTY = "font-family";
93
    String CSS_FONT_SIZE_PROPERTY = "font-size";
93
    final static String CSS_FONT_SIZE_PROPERTY = "font-size";
94
    String CSS_FONT_SIZE_ADJUST_PROPERTY = "font-size-adjust";
94
    final static String CSS_FONT_SIZE_ADJUST_PROPERTY = "font-size-adjust";
95
    String CSS_FONT_STRETCH_PROPERTY = "font-stretch";
95
    final static String CSS_FONT_STRETCH_PROPERTY = "font-stretch";
96
    String CSS_FONT_STYLE_PROPERTY = "font-style";
96
    final static String CSS_FONT_STYLE_PROPERTY = "font-style";
97
    String CSS_FONT_VARIANT_PROPERTY = "font-variant";
97
    final static String CSS_FONT_VARIANT_PROPERTY = "font-variant";
98
    String CSS_FONT_WEIGHT_PROPERTY = "font-weight";
98
    final static String CSS_FONT_WEIGHT_PROPERTY = "font-weight";
99
    String CSS_GLYPH_ORIENTATION_HORIZONTAL_PROPERTY = "glyph-orientation-horizontal";
99
    final static String CSS_GLYPH_ORIENTATION_HORIZONTAL_PROPERTY = "glyph-orientation-horizontal";
100
    String CSS_GLYPH_ORIENTATION_VERTICAL_PROPERTY = "glyph-orientation-vertical";
100
    final static String CSS_GLYPH_ORIENTATION_VERTICAL_PROPERTY = "glyph-orientation-vertical";
101
    String CSS_IMAGE_RENDERING_PROPERTY = "image-rendering";
101
    final static String CSS_IMAGE_RENDERING_PROPERTY = "image-rendering";
102
    String CSS_KERNING_PROPERTY = "kerning";
102
    final static String CSS_KERNING_PROPERTY = "kerning";
103
    String CSS_LETTER_SPACING_PROPERTY = "letter-spacing";
103
    final static String CSS_LETTER_SPACING_PROPERTY = "letter-spacing";
104
    String CSS_LIGHTING_COLOR_PROPERTY = "lighting-color";
104
    final static String CSS_LIGHTING_COLOR_PROPERTY = "lighting-color";
105
    String CSS_LINE_HEIGHT_PROPERTY = "line-height";
105
    final static String CSS_LINE_HEIGHT_PROPERTY = "line-height";
106
    String CSS_MARKER_PROPERTY = "marker";
106
    final static String CSS_MARKER_PROPERTY = "marker";
107
    String CSS_MARKER_END_PROPERTY = "marker-end";
107
    final static String CSS_MARKER_END_PROPERTY = "marker-end";
108
    String CSS_MARKER_MID_PROPERTY = "marker-mid";
108
    final static String CSS_MARKER_MID_PROPERTY = "marker-mid";
109
    String CSS_MARKER_START_PROPERTY = "marker-start";
109
    final static String CSS_MARKER_START_PROPERTY = "marker-start";
110
    String CSS_MASK_PROPERTY = "mask";
110
    final static String CSS_MASK_PROPERTY = "mask";
111
    String CSS_OPACITY_PROPERTY = "opacity";
111
    final static String CSS_OPACITY_PROPERTY = "opacity";
112
    String CSS_OVERFLOW_PROPERTY = "overflow";
112
    final static String CSS_OVERFLOW_PROPERTY = "overflow";
113
    String CSS_POINTER_EVENTS_PROPERTY = "pointer-events";
113
    final static String CSS_POINTER_EVENTS_PROPERTY = "pointer-events";
114
    String CSS_SHAPE_RENDERING_PROPERTY = "shape-rendering";
114
    final static String CSS_SHAPE_RENDERING_PROPERTY = "shape-rendering";
115
    String CSS_SRC_PROPERTY = "src";
115
    final static String CSS_SRC_PROPERTY = "src";
116
    String CSS_STOP_COLOR_PROPERTY = "stop-color";
116
    final static String CSS_STOP_COLOR_PROPERTY = "stop-color";
117
    String CSS_STOP_OPACITY_PROPERTY = "stop-opacity";
117
    final static String CSS_STOP_OPACITY_PROPERTY = "stop-opacity";
118
    String CSS_STROKE_PROPERTY = "stroke";
118
    final static String CSS_STROKE_PROPERTY = "stroke";
119
    String CSS_STROKE_DASHARRAY_PROPERTY = "stroke-dasharray";
119
    final static String CSS_STROKE_DASHARRAY_PROPERTY = "stroke-dasharray";
120
    String CSS_STROKE_DASHOFFSET_PROPERTY = "stroke-dashoffset";
120
    final static String CSS_STROKE_DASHOFFSET_PROPERTY = "stroke-dashoffset";
121
    String CSS_STROKE_LINECAP_PROPERTY = "stroke-linecap";
121
    final static String CSS_STROKE_LINECAP_PROPERTY = "stroke-linecap";
122
    String CSS_STROKE_LINEJOIN_PROPERTY = "stroke-linejoin";
122
    final static String CSS_STROKE_LINEJOIN_PROPERTY = "stroke-linejoin";
123
    String CSS_STROKE_MITERLIMIT_PROPERTY = "stroke-miterlimit";
123
    final static String CSS_STROKE_MITERLIMIT_PROPERTY = "stroke-miterlimit";
124
    String CSS_STROKE_OPACITY_PROPERTY = "stroke-opacity";
124
    final static String CSS_STROKE_OPACITY_PROPERTY = "stroke-opacity";
125
    String CSS_STROKE_WIDTH_PROPERTY = "stroke-width";
125
    final static String CSS_STROKE_WIDTH_PROPERTY = "stroke-width";
126
    String CSS_TEXT_ANCHOR_PROPERTY = "text-anchor";
126
    final static String CSS_TEXT_ANCHOR_PROPERTY = "text-anchor";
127
    String CSS_TEXT_DECORATION_PROPERTY = "text-decoration";
127
    final static String CSS_TEXT_DECORATION_PROPERTY = "text-decoration";
128
    String CSS_TEXT_RENDERING_PROPERTY = "text-rendering";
128
    final static String CSS_TEXT_RENDERING_PROPERTY = "text-rendering";
129
    String CSS_UNICODE_BIDI_PROPERTY = "unicode-bidi";
129
    final static String CSS_UNICODE_BIDI_PROPERTY = "unicode-bidi";
130
    String CSS_VISIBILITY_PROPERTY = "visibility";
130
    final static String CSS_VISIBILITY_PROPERTY = "visibility";
131
    String CSS_WORD_SPACING_PROPERTY = "word-spacing";
131
    final static String CSS_WORD_SPACING_PROPERTY = "word-spacing";
132
    String CSS_WRITING_MODE_PROPERTY = "writing-mode";
132
    final static String CSS_WRITING_MODE_PROPERTY = "writing-mode";
133
133
134
    //
134
    //
135
    // The CSS property values.
135
    // The CSS property values.
136
    //
136
    //
137
    String CSS_ACCUMULATE_VALUE = "accumulate";
137
    final static String CSS_ACCUMULATE_VALUE = "accumulate";
138
    String CSS_ACTIVEBORDER_VALUE = "activeborder";
138
    final static String CSS_ACTIVEBORDER_VALUE = "activeborder";
139
    String CSS_ACTIVECAPTION_VALUE = "activecaption";
139
    final static String CSS_ACTIVECAPTION_VALUE = "activecaption";
140
    String CSS_AFTER_EDGE_VALUE = "after-edge";
140
    final static String CSS_AFTER_EDGE_VALUE = "after-edge";
141
    String CSS_ALICEBLUE_VALUE = "aliceblue";
141
    final static String CSS_ALICEBLUE_VALUE = "aliceblue";
142
    String CSS_ALL_VALUE = "all";
142
    final static String CSS_ALL_VALUE = "all";
143
    String CSS_ALPHABETIC_VALUE = "alphabetic";
143
    final static String CSS_ALPHABETIC_VALUE = "alphabetic";
144
    String CSS_ANTIQUEWHITE_VALUE = "antiquewhite";
144
    final static String CSS_ANTIQUEWHITE_VALUE = "antiquewhite";
145
    String CSS_APPWORKSPACE_VALUE = "appworkspace";
145
    final static String CSS_APPWORKSPACE_VALUE = "appworkspace";
146
    String CSS_AQUAMARINE_VALUE = "aquamarine";
146
    final static String CSS_AQUAMARINE_VALUE = "aquamarine";
147
    String CSS_AQUA_VALUE = "aqua";
147
    final static String CSS_AQUA_VALUE = "aqua";
148
    String CSS_AUTOSENSE_SCRIPT_VALUE = "autosense-script";
148
    final static String CSS_AUTOSENSE_SCRIPT_VALUE = "autosense-script";
149
    String CSS_AUTO_VALUE = "auto";
149
    final static String CSS_AUTO_VALUE = "auto";
150
    String CSS_AZURE_VALUE = "azure";
150
    final static String CSS_AZURE_VALUE = "azure";
151
    String CSS_BACKGROUND_VALUE = "background";
151
    final static String CSS_BACKGROUND_VALUE = "background";
152
    String CSS_BASELINE_VALUE = "baseline";
152
    final static String CSS_BASELINE_VALUE = "baseline";
153
    String CSS_BEFORE_EDGE_VALUE = "before-edge";
153
    final static String CSS_BEFORE_EDGE_VALUE = "before-edge";
154
    String CSS_BEIGE_VALUE = "beige";
154
    final static String CSS_BEIGE_VALUE = "beige";
155
    String CSS_BEVEL_VALUE = "bevel";
155
    final static String CSS_BEVEL_VALUE = "bevel";
156
    String CSS_BIDI_OVERRIDE_VALUE = "bidi-override";
156
    final static String CSS_BIDI_OVERRIDE_VALUE = "bidi-override";
157
    String CSS_BISQUE_VALUE = "bisque";
157
    final static String CSS_BISQUE_VALUE = "bisque";
158
    String CSS_BLACK_VALUE = "black";
158
    final static String CSS_BLACK_VALUE = "black";
159
    String CSS_BLANCHEDALMOND_VALUE = "blanchedalmond";
159
    final static String CSS_BLANCHEDALMOND_VALUE = "blanchedalmond";
160
    String CSS_BLINK_VALUE = "blink";
160
    final static String CSS_BLINK_VALUE = "blink";
161
    String CSS_BLOCK_VALUE = "block";
161
    final static String CSS_BLOCK_VALUE = "block";
162
    String CSS_BLUEVIOLET_VALUE = "blueviolet";
162
    final static String CSS_BLUEVIOLET_VALUE = "blueviolet";
163
    String CSS_BLUE_VALUE = "blue";
163
    final static String CSS_BLUE_VALUE = "blue";
164
    String CSS_BOLDER_VALUE = "bolder";
164
    final static String CSS_BOLDER_VALUE = "bolder";
165
    String CSS_BOLD_VALUE = "bold";
165
    final static String CSS_BOLD_VALUE = "bold";
166
    String CSS_BOTTOM_VALUE = "bottom";
166
    final static String CSS_BOTTOM_VALUE = "bottom";
167
    String CSS_BROWN_VALUE = "brown";
167
    final static String CSS_BROWN_VALUE = "brown";
168
    String CSS_BURLYWOOD_VALUE = "burlywood";
168
    final static String CSS_BURLYWOOD_VALUE = "burlywood";
169
    String CSS_BUTTONFACE_VALUE = "buttonface";
169
    final static String CSS_BUTTONFACE_VALUE = "buttonface";
170
    String CSS_BUTTONHIGHLIGHT_VALUE = "buttonhighlight";
170
    final static String CSS_BUTTONHIGHLIGHT_VALUE = "buttonhighlight";
171
    String CSS_BUTTONSHADOW_VALUE = "buttonshadow";
171
    final static String CSS_BUTTONSHADOW_VALUE = "buttonshadow";
172
    String CSS_BUTTONTEXT_VALUE = "buttontext";
172
    final static String CSS_BUTTONTEXT_VALUE = "buttontext";
173
    String CSS_BUTT_VALUE = "butt";
173
    final static String CSS_BUTT_VALUE = "butt";
174
    String CSS_CADETBLUE_VALUE = "cadetblue";
174
    final static String CSS_CADETBLUE_VALUE = "cadetblue";
175
    String CSS_CAPTIONTEXT_VALUE = "captiontext";
175
    final static String CSS_CAPTIONTEXT_VALUE = "captiontext";
176
    String CSS_CENTER_VALUE = "center";
176
    final static String CSS_CENTER_VALUE = "center";
177
    String CSS_CENTRAL_VALUE = "central";
177
    final static String CSS_CENTRAL_VALUE = "central";
178
    String CSS_CHARTREUSE_VALUE = "chartreuse";
178
    final static String CSS_CHARTREUSE_VALUE = "chartreuse";
179
    String CSS_CHOCOLATE_VALUE = "chocolate";
179
    final static String CSS_CHOCOLATE_VALUE = "chocolate";
180
    String CSS_COLLAPSE_VALUE = "collapse";
180
    final static String CSS_COLLAPSE_VALUE = "collapse";
181
    String CSS_COMPACT_VALUE = "compact";
181
    final static String CSS_COMPACT_VALUE = "compact";
182
    String CSS_CONDENSED_VALUE = "condensed";
182
    final static String CSS_CONDENSED_VALUE = "condensed";
183
    String CSS_CORAL_VALUE = "coral";
183
    final static String CSS_CORAL_VALUE = "coral";
184
    String CSS_CORNFLOWERBLUE_VALUE = "cornflowerblue";
184
    final static String CSS_CORNFLOWERBLUE_VALUE = "cornflowerblue";
185
    String CSS_CORNSILK_VALUE = "cornsilk";
185
    final static String CSS_CORNSILK_VALUE = "cornsilk";
186
    String CSS_CRIMSON_VALUE = "crimson";
186
    final static String CSS_CRIMSON_VALUE = "crimson";
187
    String CSS_CRISPEDGES_VALUE = "crispedges";
187
    final static String CSS_CRISPEDGES_VALUE = "crispedges";
188
    String CSS_CROSSHAIR_VALUE = "crosshair";
188
    final static String CSS_CROSSHAIR_VALUE = "crosshair";
189
    String CSS_CURRENTCOLOR_VALUE = "currentcolor";
189
    final static String CSS_CURRENTCOLOR_VALUE = "currentcolor";
190
    String CSS_CURSIVE_VALUE = "cursive";
190
    final static String CSS_CURSIVE_VALUE = "cursive";
191
    String CSS_CYAN_VALUE = "cyan";
191
    final static String CSS_CYAN_VALUE = "cyan";
192
    String CSS_DARKBLUE_VALUE = "darkblue";
192
    final static String CSS_DARKBLUE_VALUE = "darkblue";
193
    String CSS_DARKCYAN_VALUE = "darkcyan";
193
    final static String CSS_DARKCYAN_VALUE = "darkcyan";
194
    String CSS_DARKGOLDENROD_VALUE = "darkgoldenrod";
194
    final static String CSS_DARKGOLDENROD_VALUE = "darkgoldenrod";
195
    String CSS_DARKGRAY_VALUE = "darkgray";
195
    final static String CSS_DARKGRAY_VALUE = "darkgray";
196
    String CSS_DARKGREEN_VALUE = "darkgreen";
196
    final static String CSS_DARKGREEN_VALUE = "darkgreen";
197
    String CSS_DARKGREY_VALUE = "darkgrey";
197
    final static String CSS_DARKGREY_VALUE = "darkgrey";
198
    String CSS_DARKKHAKI_VALUE = "darkkhaki";
198
    final static String CSS_DARKKHAKI_VALUE = "darkkhaki";
199
    String CSS_DARKMAGENTA_VALUE = "darkmagenta";
199
    final static String CSS_DARKMAGENTA_VALUE = "darkmagenta";
200
    String CSS_DARKOLIVEGREEN_VALUE = "darkolivegreen";
200
    final static String CSS_DARKOLIVEGREEN_VALUE = "darkolivegreen";
201
    String CSS_DARKORANGE_VALUE = "darkorange";
201
    final static String CSS_DARKORANGE_VALUE = "darkorange";
202
    String CSS_DARKORCHID_VALUE = "darkorchid";
202
    final static String CSS_DARKORCHID_VALUE = "darkorchid";
203
    String CSS_DARKRED_VALUE = "darkred";
203
    final static String CSS_DARKRED_VALUE = "darkred";
204
    String CSS_DARKSALMON_VALUE = "darksalmon";
204
    final static String CSS_DARKSALMON_VALUE = "darksalmon";
205
    String CSS_DARKSEAGREEN_VALUE = "darkseagreen";
205
    final static String CSS_DARKSEAGREEN_VALUE = "darkseagreen";
206
    String CSS_DARKSLATEBLUE_VALUE = "darkslateblue";
206
    final static String CSS_DARKSLATEBLUE_VALUE = "darkslateblue";
207
    String CSS_DARKSLATEGRAY_VALUE = "darkslategray";
207
    final static String CSS_DARKSLATEGRAY_VALUE = "darkslategray";
208
    String CSS_DARKSLATEGREY_VALUE = "darkslategrey";
208
    final static String CSS_DARKSLATEGREY_VALUE = "darkslategrey";
209
    String CSS_DARKTURQUOISE_VALUE = "darkturquoise";
209
    final static String CSS_DARKTURQUOISE_VALUE = "darkturquoise";
210
    String CSS_DARKVIOLET_VALUE = "darkviolet";
210
    final static String CSS_DARKVIOLET_VALUE = "darkviolet";
211
    String CSS_DEEPPINK_VALUE = "deeppink";
211
    final static String CSS_DEEPPINK_VALUE = "deeppink";
212
    String CSS_DEEPSKYBLUE_VALUE = "deepskyblue";
212
    final static String CSS_DEEPSKYBLUE_VALUE = "deepskyblue";
213
    String CSS_DEFAULT_VALUE = "default";
213
    final static String CSS_DEFAULT_VALUE = "default";
214
    String CSS_DIMGRAY_VALUE = "dimgray";
214
    final static String CSS_DIMGRAY_VALUE = "dimgray";
215
    String CSS_DIMGREY_VALUE = "dimgrey";
215
    final static String CSS_DIMGREY_VALUE = "dimgrey";
216
    String CSS_DODGERBLUE_VALUE = "dodgerblue";
216
    final static String CSS_DODGERBLUE_VALUE = "dodgerblue";
217
    String CSS_EMBED_VALUE = "embed";
217
    final static String CSS_EMBED_VALUE = "embed";
218
    String CSS_END_VALUE = "end";
218
    final static String CSS_END_VALUE = "end";
219
    String CSS_EVENODD_VALUE = "evenodd";
219
    final static String CSS_EVENODD_VALUE = "evenodd";
220
    String CSS_EXPANDED_VALUE = "expanded";
220
    final static String CSS_EXPANDED_VALUE = "expanded";
221
    String CSS_EXTRA_CONDENSED_VALUE = "extra-condensed";
221
    final static String CSS_EXTRA_CONDENSED_VALUE = "extra-condensed";
222
    String CSS_EXTRA_EXPANDED_VALUE = "extra-expanded";
222
    final static String CSS_EXTRA_EXPANDED_VALUE = "extra-expanded";
223
    String CSS_E_RESIZE_VALUE = "e-resize";
223
    final static String CSS_E_RESIZE_VALUE = "e-resize";
224
    String CSS_FANTASY_VALUE = "fantasy";
224
    final static String CSS_FANTASY_VALUE = "fantasy";
225
    String CSS_FILLSTROKE_VALUE = "fillstroke";
225
    final static String CSS_FILLSTROKE_VALUE = "fillstroke";
226
    String CSS_FILL_VALUE = "fill";
226
    final static String CSS_FILL_VALUE = "fill";
227
    String CSS_FIREBRICK_VALUE = "firebrick";
227
    final static String CSS_FIREBRICK_VALUE = "firebrick";
228
    String CSS_FLORALWHITE_VALUE = "floralwhite";
228
    final static String CSS_FLORALWHITE_VALUE = "floralwhite";
229
    String CSS_FORESTGREEN_VALUE = "forestgreen";
229
    final static String CSS_FORESTGREEN_VALUE = "forestgreen";
230
    String CSS_FUCHSIA_VALUE = "fuchsia";
230
    final static String CSS_FUCHSIA_VALUE = "fuchsia";
231
    String CSS_GAINSBORO_VALUE = "gainsboro";
231
    final static String CSS_GAINSBORO_VALUE = "gainsboro";
232
    String CSS_GEOMETRICPRECISION_VALUE = "geometricprecision";
232
    final static String CSS_GEOMETRICPRECISION_VALUE = "geometricprecision";
233
    String CSS_GHOSTWHITE_VALUE = "ghostwhite";
233
    final static String CSS_GHOSTWHITE_VALUE = "ghostwhite";
234
    String CSS_GOLDENROD_VALUE = "goldenrod";
234
    final static String CSS_GOLDENROD_VALUE = "goldenrod";
235
    String CSS_GOLD_VALUE = "gold";
235
    final static String CSS_GOLD_VALUE = "gold";
236
    String CSS_GRAYTEXT_VALUE = "graytext";
236
    final static String CSS_GRAYTEXT_VALUE = "graytext";
237
    String CSS_GRAY_VALUE = "gray";
237
    final static String CSS_GRAY_VALUE = "gray";
238
    String CSS_GREENYELLOW_VALUE = "greenyellow";
238
    final static String CSS_GREENYELLOW_VALUE = "greenyellow";
239
    String CSS_GREEN_VALUE = "green";
239
    final static String CSS_GREEN_VALUE = "green";
240
    String CSS_GREY_VALUE = "grey";
240
    final static String CSS_GREY_VALUE = "grey";
241
    String CSS_HANGING_VALUE = "hanging";
241
    final static String CSS_HANGING_VALUE = "hanging";
242
    String CSS_HELP_VALUE = "help";
242
    final static String CSS_HELP_VALUE = "help";
243
    String CSS_HIDDEN_VALUE = "hidden";
243
    final static String CSS_HIDDEN_VALUE = "hidden";
244
    String CSS_HIGHLIGHTTEXT_VALUE = "highlighttext";
244
    final static String CSS_HIGHLIGHTTEXT_VALUE = "highlighttext";
245
    String CSS_HIGHLIGHT_VALUE = "highlight";
245
    final static String CSS_HIGHLIGHT_VALUE = "highlight";
246
    String CSS_HONEYDEW_VALUE = "honeydew";
246
    final static String CSS_HONEYDEW_VALUE = "honeydew";
247
    String CSS_HOTPINK_VALUE = "hotpink";
247
    final static String CSS_HOTPINK_VALUE = "hotpink";
248
    String CSS_IDEOGRAPHIC_VALUE = "ideographic";
248
    final static String CSS_IDEOGRAPHIC_VALUE = "ideographic";
249
    String CSS_INACTIVEBORDER_VALUE = "inactiveborder";
249
    final static String CSS_INACTIVEBORDER_VALUE = "inactiveborder";
250
    String CSS_INACTIVECAPTIONTEXT_VALUE = "inactivecaptiontext";
250
    final static String CSS_INACTIVECAPTIONTEXT_VALUE = "inactivecaptiontext";
251
    String CSS_INACTIVECAPTION_VALUE = "inactivecaption";
251
    final static String CSS_INACTIVECAPTION_VALUE = "inactivecaption";
252
    String CSS_INDIANRED_VALUE = "indianred";
252
    final static String CSS_INDIANRED_VALUE = "indianred";
253
    String CSS_INDIGO_VALUE = "indigo";
253
    final static String CSS_INDIGO_VALUE = "indigo";
254
    String CSS_INFOBACKGROUND_VALUE = "infobackground";
254
    final static String CSS_INFOBACKGROUND_VALUE = "infobackground";
255
    String CSS_INFOTEXT_VALUE = "infotext";
255
    final static String CSS_INFOTEXT_VALUE = "infotext";
256
    String CSS_INLINE_TABLE_VALUE = "inline-table";
256
    final static String CSS_INLINE_TABLE_VALUE = "inline-table";
257
    String CSS_INLINE_VALUE = "inline";
257
    final static String CSS_INLINE_VALUE = "inline";
258
    String CSS_ITALIC_VALUE = "italic";
258
    final static String CSS_ITALIC_VALUE = "italic";
259
    String CSS_IVORY_VALUE = "ivory";
259
    final static String CSS_IVORY_VALUE = "ivory";
260
    String CSS_KHAKI_VALUE = "khaki";
260
    final static String CSS_KHAKI_VALUE = "khaki";
261
    String CSS_LARGER_VALUE = "larger";
261
    final static String CSS_LARGER_VALUE = "larger";
262
    String CSS_LARGE_VALUE = "large";
262
    final static String CSS_LARGE_VALUE = "large";
263
    String CSS_LAVENDERBLUSH_VALUE = "lavenderblush";
263
    final static String CSS_LAVENDERBLUSH_VALUE = "lavenderblush";
264
    String CSS_LAVENDER_VALUE = "lavender";
264
    final static String CSS_LAVENDER_VALUE = "lavender";
265
    String CSS_LAWNGREEN_VALUE = "lawngreen";
265
    final static String CSS_LAWNGREEN_VALUE = "lawngreen";
266
    String CSS_LEMONCHIFFON_VALUE = "lemonchiffon";
266
    final static String CSS_LEMONCHIFFON_VALUE = "lemonchiffon";
267
    String CSS_LIGHTBLUE_VALUE = "lightblue";
267
    final static String CSS_LIGHTBLUE_VALUE = "lightblue";
268
    String CSS_LIGHTCORAL_VALUE = "lightcoral";
268
    final static String CSS_LIGHTCORAL_VALUE = "lightcoral";
269
    String CSS_LIGHTCYAN_VALUE = "lightcyan";
269
    final static String CSS_LIGHTCYAN_VALUE = "lightcyan";
270
    String CSS_LIGHTER_VALUE = "lighter";
270
    final static String CSS_LIGHTER_VALUE = "lighter";
271
    String CSS_LIGHTGOLDENRODYELLOW_VALUE = "lightgoldenrodyellow";
271
    final static String CSS_LIGHTGOLDENRODYELLOW_VALUE = "lightgoldenrodyellow";
272
    String CSS_LIGHTGRAY_VALUE = "lightgray";
272
    final static String CSS_LIGHTGRAY_VALUE = "lightgray";
273
    String CSS_LIGHTGREEN_VALUE = "lightgreen";
273
    final static String CSS_LIGHTGREEN_VALUE = "lightgreen";
274
    String CSS_LIGHTGREY_VALUE = "lightgrey";
274
    final static String CSS_LIGHTGREY_VALUE = "lightgrey";
275
    String CSS_LIGHTPINK_VALUE = "lightpink";
275
    final static String CSS_LIGHTPINK_VALUE = "lightpink";
276
    String CSS_LIGHTSALMON_VALUE = "lightsalmon";
276
    final static String CSS_LIGHTSALMON_VALUE = "lightsalmon";
277
    String CSS_LIGHTSEAGREEN_VALUE = "lightseagreen";
277
    final static String CSS_LIGHTSEAGREEN_VALUE = "lightseagreen";
278
    String CSS_LIGHTSKYBLUE_VALUE = "lightskyblue";
278
    final static String CSS_LIGHTSKYBLUE_VALUE = "lightskyblue";
279
    String CSS_LIGHTSLATEGRAY_VALUE = "lightslategray";
279
    final static String CSS_LIGHTSLATEGRAY_VALUE = "lightslategray";
280
    String CSS_LIGHTSLATEGREY_VALUE = "lightslategrey";
280
    final static String CSS_LIGHTSLATEGREY_VALUE = "lightslategrey";
281
    String CSS_LIGHTSTEELBLUE_VALUE = "lightsteelblue";
281
    final static String CSS_LIGHTSTEELBLUE_VALUE = "lightsteelblue";
282
    String CSS_LIGHTYELLOW_VALUE = "lightyellow";
282
    final static String CSS_LIGHTYELLOW_VALUE = "lightyellow";
283
    String CSS_LIMEGREEN_VALUE = "limegreen";
283
    final static String CSS_LIMEGREEN_VALUE = "limegreen";
284
    String CSS_LIME_VALUE = "lime";
284
    final static String CSS_LIME_VALUE = "lime";
285
    String CSS_LINEARRGB_VALUE = "linearrgb";
285
    final static String CSS_LINEARRGB_VALUE = "linearrgb";
286
    String CSS_LINEN_VALUE = "linen";
286
    final static String CSS_LINEN_VALUE = "linen";
287
    String CSS_LINE_THROUGH_VALUE = "line-through";
287
    final static String CSS_LINE_THROUGH_VALUE = "line-through";
288
    String CSS_LIST_ITEM_VALUE = "list-item";
288
    final static String CSS_LIST_ITEM_VALUE = "list-item";
289
    String CSS_LOWER_VALUE = "lower";
289
    final static String CSS_LOWER_VALUE = "lower";
290
    String CSS_LR_TB_VALUE = "lr-tb";
290
    final static String CSS_LR_TB_VALUE = "lr-tb";
291
    String CSS_LR_VALUE = "lr";
291
    final static String CSS_LR_VALUE = "lr";
292
    String CSS_LTR_VALUE = "ltr";
292
    final static String CSS_LTR_VALUE = "ltr";
293
    String CSS_MAGENTA_VALUE = "magenta";
293
    final static String CSS_MAGENTA_VALUE = "magenta";
294
    String CSS_MARKER_VALUE = "marker";
294
    final static String CSS_MARKER_VALUE = "marker";
295
    String CSS_MAROON_VALUE = "maroon";
295
    final static String CSS_MAROON_VALUE = "maroon";
296
    String CSS_MATHEMATICAL_VALUE = "mathematical";
296
    final static String CSS_MATHEMATICAL_VALUE = "mathematical";
297
    String CSS_MEDIUMAQUAMARINE_VALUE = "mediumaquamarine";
297
    final static String CSS_MEDIUMAQUAMARINE_VALUE = "mediumaquamarine";
298
    String CSS_MEDIUMBLUE_VALUE = "mediumblue";
298
    final static String CSS_MEDIUMBLUE_VALUE = "mediumblue";
299
    String CSS_MEDIUMORCHID_VALUE = "mediumorchid";
299
    final static String CSS_MEDIUMORCHID_VALUE = "mediumorchid";
300
    String CSS_MEDIUMPURPLE_VALUE = "mediumpurple";
300
    final static String CSS_MEDIUMPURPLE_VALUE = "mediumpurple";
301
    String CSS_MEDIUMSEAGREEN_VALUE = "mediumseagreen";
301
    final static String CSS_MEDIUMSEAGREEN_VALUE = "mediumseagreen";
302
    String CSS_MEDIUMSLATEBLUE_VALUE = "mediumslateblue";
302
    final static String CSS_MEDIUMSLATEBLUE_VALUE = "mediumslateblue";
303
    String CSS_MEDIUMSPRINGGREEN_VALUE = "mediumspringgreen";
303
    final static String CSS_MEDIUMSPRINGGREEN_VALUE = "mediumspringgreen";
304
    String CSS_MEDIUMTURQUOISE_VALUE = "mediumturquoise";
304
    final static String CSS_MEDIUMTURQUOISE_VALUE = "mediumturquoise";
305
    String CSS_MEDIUMVIOLETRED_VALUE = "mediumvioletred";
305
    final static String CSS_MEDIUMVIOLETRED_VALUE = "mediumvioletred";
306
    String CSS_MEDIUM_VALUE = "medium";
306
    final static String CSS_MEDIUM_VALUE = "medium";
307
    String CSS_MENUTEXT_VALUE = "menutext";
307
    final static String CSS_MENUTEXT_VALUE = "menutext";
308
    String CSS_MENU_VALUE = "menu";
308
    final static String CSS_MENU_VALUE = "menu";
309
    String CSS_MIDDLE_VALUE = "middle";
309
    final static String CSS_MIDDLE_VALUE = "middle";
310
    String CSS_MIDNIGHTBLUE_VALUE = "midnightblue";
310
    final static String CSS_MIDNIGHTBLUE_VALUE = "midnightblue";
311
    String CSS_MINTCREAM_VALUE = "mintcream";
311
    final static String CSS_MINTCREAM_VALUE = "mintcream";
312
    String CSS_MISTYROSE_VALUE = "mistyrose";
312
    final static String CSS_MISTYROSE_VALUE = "mistyrose";
313
    String CSS_MITER_VALUE = "miter";
313
    final static String CSS_MITER_VALUE = "miter";
314
    String CSS_MOCCASIN_VALUE = "moccasin";
314
    final static String CSS_MOCCASIN_VALUE = "moccasin";
315
    String CSS_MONOSPACE_VALUE = "monospace";
315
    final static String CSS_MONOSPACE_VALUE = "monospace";
316
    String CSS_MOVE_VALUE = "move";
316
    final static String CSS_MOVE_VALUE = "move";
317
    String CSS_NARROWER_VALUE = "narrower";
317
    final static String CSS_NARROWER_VALUE = "narrower";
318
    String CSS_NAVAJOWHITE_VALUE = "navajowhite";
318
    final static String CSS_NAVAJOWHITE_VALUE = "navajowhite";
319
    String CSS_NAVY_VALUE = "navy";
319
    final static String CSS_NAVY_VALUE = "navy";
320
    String CSS_NEW_VALUE = "new";
320
    final static String CSS_NEW_VALUE = "new";
321
    String CSS_NE_RESIZE_VALUE = "ne-resize";
321
    final static String CSS_NE_RESIZE_VALUE = "ne-resize";
322
    String CSS_NONE_VALUE = "none";
322
    final static String CSS_NONE_VALUE = "none";
323
    String CSS_NONZERO_VALUE = "nonzero";
323
    final static String CSS_NONZERO_VALUE = "nonzero";
324
    String CSS_NORMAL_VALUE = "normal";
324
    final static String CSS_NORMAL_VALUE = "normal";
325
    String CSS_NO_CHANGE_VALUE = "no-change";
325
    final static String CSS_NO_CHANGE_VALUE = "no-change";
326
    String CSS_NW_RESIZE_VALUE = "nw-resize";
326
    final static String CSS_NW_RESIZE_VALUE = "nw-resize";
327
    String CSS_N_RESIZE_VALUE = "n-resize";
327
    final static String CSS_N_RESIZE_VALUE = "n-resize";
328
    String CSS_OBLIQUE_VALUE = "oblique";
328
    final static String CSS_OBLIQUE_VALUE = "oblique";
329
    String CSS_OLDLACE_VALUE = "oldlace";
329
    final static String CSS_OLDLACE_VALUE = "oldlace";
330
    String CSS_OLIVEDRAB_VALUE = "olivedrab";
330
    final static String CSS_OLIVEDRAB_VALUE = "olivedrab";
331
    String CSS_OLIVE_VALUE = "olive";
331
    final static String CSS_OLIVE_VALUE = "olive";
332
    String CSS_OPTIMIZELEGIBILITY_VALUE = "optimizelegibility";
332
    final static String CSS_OPTIMIZELEGIBILITY_VALUE = "optimizelegibility";
333
    String CSS_OPTIMIZEQUALITY_VALUE = "optimizequality";
333
    final static String CSS_OPTIMIZEQUALITY_VALUE = "optimizequality";
334
    String CSS_OPTIMIZESPEED_VALUE = "optimizespeed";
334
    final static String CSS_OPTIMIZESPEED_VALUE = "optimizespeed";
335
    String CSS_ORANGERED_VALUE = "orangered";
335
    final static String CSS_ORANGERED_VALUE = "orangered";
336
    String CSS_ORANGE_VALUE = "orange";
336
    final static String CSS_ORANGE_VALUE = "orange";
337
    String CSS_ORCHID_VALUE = "orchid";
337
    final static String CSS_ORCHID_VALUE = "orchid";
338
    String CSS_OVERLINE_VALUE = "overline";
338
    final static String CSS_OVERLINE_VALUE = "overline";
339
    String CSS_PAINTED_VALUE = "painted";
339
    final static String CSS_PAINTED_VALUE = "painted";
340
    String CSS_PALEGOLDENROD_VALUE = "palegoldenrod";
340
    final static String CSS_PALEGOLDENROD_VALUE = "palegoldenrod";
341
    String CSS_PALEGREEN_VALUE = "palegreen";
341
    final static String CSS_PALEGREEN_VALUE = "palegreen";
342
    String CSS_PALETURQUOISE_VALUE = "paleturquoise";
342
    final static String CSS_PALETURQUOISE_VALUE = "paleturquoise";
343
    String CSS_PALEVIOLETRED_VALUE = "palevioletred";
343
    final static String CSS_PALEVIOLETRED_VALUE = "palevioletred";
344
    String CSS_PAPAYAWHIP_VALUE = "papayawhip";
344
    final static String CSS_PAPAYAWHIP_VALUE = "papayawhip";
345
    String CSS_PEACHPUFF_VALUE = "peachpuff";
345
    final static String CSS_PEACHPUFF_VALUE = "peachpuff";
346
    String CSS_PERU_VALUE = "peru";
346
    final static String CSS_PERU_VALUE = "peru";
347
    String CSS_PINK_VALUE = "pink";
347
    final static String CSS_PINK_VALUE = "pink";
348
    String CSS_PLUM_VALUE = "plum";
348
    final static String CSS_PLUM_VALUE = "plum";
349
    String CSS_POINTER_VALUE = "pointer";
349
    final static String CSS_POINTER_VALUE = "pointer";
350
    String CSS_POWDERBLUE_VALUE = "powderblue";
350
    final static String CSS_POWDERBLUE_VALUE = "powderblue";
351
    String CSS_PURPLE_VALUE = "purple";
351
    final static String CSS_PURPLE_VALUE = "purple";
352
    String CSS_RED_VALUE = "red";
352
    final static String CSS_RED_VALUE = "red";
353
    String CSS_RESET_SIZE_VALUE = "reset-size";
353
    final static String CSS_RESET_SIZE_VALUE = "reset-size";
354
    String CSS_RESET_VALUE = "reset";
354
    final static String CSS_RESET_VALUE = "reset";
355
    String CSS_RL_TB_VALUE = "rl-tb";
355
    final static String CSS_RL_TB_VALUE = "rl-tb";
356
    String CSS_RL_VALUE = "rl";
356
    final static String CSS_RL_VALUE = "rl";
357
    String CSS_ROSYBROWN_VALUE = "rosybrown";
357
    final static String CSS_ROSYBROWN_VALUE = "rosybrown";
358
    String CSS_ROUND_VALUE = "round";
358
    final static String CSS_ROUND_VALUE = "round";
359
    String CSS_ROYALBLUE_VALUE = "royalblue";
359
    final static String CSS_ROYALBLUE_VALUE = "royalblue";
360
    String CSS_RTL_VALUE = "rtl";
360
    final static String CSS_RTL_VALUE = "rtl";
361
    String CSS_RUN_IN_VALUE = "run-in";
361
    final static String CSS_RUN_IN_VALUE = "run-in";
362
    String CSS_SADDLEBROWN_VALUE = "saddlebrown";
362
    final static String CSS_SADDLEBROWN_VALUE = "saddlebrown";
363
    String CSS_SALMON_VALUE = "salmon";
363
    final static String CSS_SALMON_VALUE = "salmon";
364
    String CSS_SANDYBROWN_VALUE = "sandybrown";
364
    final static String CSS_SANDYBROWN_VALUE = "sandybrown";
365
    String CSS_SANS_SERIF_VALUE = "sans-serif";
365
    final static String CSS_SANS_SERIF_VALUE = "sans-serif";
366
    String CSS_SCROLLBAR_VALUE = "scrollbar";
366
    final static String CSS_SCROLLBAR_VALUE = "scrollbar";
367
    String CSS_SCROLL_VALUE = "scroll";
367
    final static String CSS_SCROLL_VALUE = "scroll";
368
    String CSS_SEAGREEN_VALUE = "seagreen";
368
    final static String CSS_SEAGREEN_VALUE = "seagreen";
369
    String CSS_SEASHELL_VALUE = "seashell";
369
    final static String CSS_SEASHELL_VALUE = "seashell";
370
    String CSS_SEMI_CONDENSED_VALUE = "semi-condensed";
370
    final static String CSS_SEMI_CONDENSED_VALUE = "semi-condensed";
371
    String CSS_SEMI_EXPANDED_VALUE = "semi-expanded";
371
    final static String CSS_SEMI_EXPANDED_VALUE = "semi-expanded";
372
    String CSS_SERIF_VALUE = "serif";
372
    final static String CSS_SERIF_VALUE = "serif";
373
    String CSS_SE_RESIZE_VALUE = "se-resize";
373
    final static String CSS_SE_RESIZE_VALUE = "se-resize";
374
    String CSS_SIENNA_VALUE = "sienna";
374
    final static String CSS_SIENNA_VALUE = "sienna";
375
    String CSS_SILVER_VALUE = "silver";
375
    final static String CSS_SILVER_VALUE = "silver";
376
    String CSS_SKYBLUE_VALUE = "skyblue";
376
    final static String CSS_SKYBLUE_VALUE = "skyblue";
377
    String CSS_SLATEBLUE_VALUE = "slateblue";
377
    final static String CSS_SLATEBLUE_VALUE = "slateblue";
378
    String CSS_SLATEGRAY_VALUE = "slategray";
378
    final static String CSS_SLATEGRAY_VALUE = "slategray";
379
    String CSS_SLATEGREY_VALUE = "slategrey";
379
    final static String CSS_SLATEGREY_VALUE = "slategrey";
380
    String CSS_SMALLER_VALUE = "smaller";
380
    final static String CSS_SMALLER_VALUE = "smaller";
381
    String CSS_SMALL_CAPS_VALUE = "small-caps";
381
    final static String CSS_SMALL_CAPS_VALUE = "small-caps";
382
    String CSS_SMALL_VALUE = "small";
382
    final static String CSS_SMALL_VALUE = "small";
383
    String CSS_SNOW_VALUE = "snow";
383
    final static String CSS_SNOW_VALUE = "snow";
384
    String CSS_SPRINGGREEN_VALUE = "springgreen";
384
    final static String CSS_SPRINGGREEN_VALUE = "springgreen";
385
    String CSS_SQUARE_VALUE = "square";
385
    final static String CSS_SQUARE_VALUE = "square";
386
    String CSS_SRGB_VALUE = "srgb";
386
    final static String CSS_SRGB_VALUE = "srgb";
387
    String CSS_START_VALUE = "start";
387
    final static String CSS_START_VALUE = "start";
388
    String CSS_STEELBLUE_VALUE = "steelblue";
388
    final static String CSS_STEELBLUE_VALUE = "steelblue";
389
    String CSS_STROKE_VALUE = "stroke";
389
    final static String CSS_STROKE_VALUE = "stroke";
390
    String CSS_SUB_VALUE = "sub";
390
    final static String CSS_SUB_VALUE = "sub";
391
    String CSS_SUPER_VALUE = "super";
391
    final static String CSS_SUPER_VALUE = "super";
392
    String CSS_SW_RESIZE_VALUE = "sw-resize";
392
    final static String CSS_SW_RESIZE_VALUE = "sw-resize";
393
    String CSS_S_RESIZE_VALUE = "s-resize";
393
    final static String CSS_S_RESIZE_VALUE = "s-resize";
394
    String CSS_TABLE_CAPTION_VALUE = "table-caption";
394
    final static String CSS_TABLE_CAPTION_VALUE = "table-caption";
395
    String CSS_TABLE_CELL_VALUE = "table-cell";
395
    final static String CSS_TABLE_CELL_VALUE = "table-cell";
396
    String CSS_TABLE_COLUMN_GROUP_VALUE = "table-column-group";
396
    final static String CSS_TABLE_COLUMN_GROUP_VALUE = "table-column-group";
397
    String CSS_TABLE_COLUMN_VALUE = "table-column";
397
    final static String CSS_TABLE_COLUMN_VALUE = "table-column";
398
    String CSS_TABLE_FOOTER_GROUP_VALUE = "table-footer-group";
398
    final static String CSS_TABLE_FOOTER_GROUP_VALUE = "table-footer-group";
399
    String CSS_TABLE_HEADER_GROUP_VALUE = "table-header-group";
399
    final static String CSS_TABLE_HEADER_GROUP_VALUE = "table-header-group";
400
    String CSS_TABLE_ROW_GROUP_VALUE = "table-row-group";
400
    final static String CSS_TABLE_ROW_GROUP_VALUE = "table-row-group";
401
    String CSS_TABLE_ROW_VALUE = "table-row";
401
    final static String CSS_TABLE_ROW_VALUE = "table-row";
402
    String CSS_TABLE_VALUE = "table";
402
    final static String CSS_TABLE_VALUE = "table";
403
    String CSS_TAN_VALUE = "tan";
403
    final static String CSS_TAN_VALUE = "tan";
404
    String CSS_TB_RL_VALUE = "tb-rl";
404
    final static String CSS_TB_RL_VALUE = "tb-rl";
405
    String CSS_TB_VALUE = "tb";
405
    final static String CSS_TB_VALUE = "tb";
406
    String CSS_TEAL_VALUE = "teal";
406
    final static String CSS_TEAL_VALUE = "teal";
407
    String CSS_TEXT_AFTER_EDGE_VALUE = "text-after-edge";
407
    final static String CSS_TEXT_AFTER_EDGE_VALUE = "text-after-edge";
408
    String CSS_TEXT_BEFORE_EDGE_VALUE = "text-before-edge";
408
    final static String CSS_TEXT_BEFORE_EDGE_VALUE = "text-before-edge";
409
    String CSS_TEXT_BOTTOM_VALUE = "text-bottom";
409
    final static String CSS_TEXT_BOTTOM_VALUE = "text-bottom";
410
    String CSS_TEXT_TOP_VALUE = "text-top";
410
    final static String CSS_TEXT_TOP_VALUE = "text-top";
411
    String CSS_TEXT_VALUE = "text";
411
    final static String CSS_TEXT_VALUE = "text";
412
    String CSS_THISTLE_VALUE = "thistle";
412
    final static String CSS_THISTLE_VALUE = "thistle";
413
    String CSS_THREEDDARKSHADOW_VALUE = "threeddarkshadow";
413
    final static String CSS_THREEDDARKSHADOW_VALUE = "threeddarkshadow";
414
    String CSS_THREEDFACE_VALUE = "threedface";
414
    final static String CSS_THREEDFACE_VALUE = "threedface";
415
    String CSS_THREEDHIGHLIGHT_VALUE = "threedhighlight";
415
    final static String CSS_THREEDHIGHLIGHT_VALUE = "threedhighlight";
416
    String CSS_THREEDLIGHTSHADOW_VALUE = "threedlightshadow";
416
    final static String CSS_THREEDLIGHTSHADOW_VALUE = "threedlightshadow";
417
    String CSS_THREEDSHADOW_VALUE = "threedshadow";
417
    final static String CSS_THREEDSHADOW_VALUE = "threedshadow";
418
    String CSS_TOMATO_VALUE = "tomato";
418
    final static String CSS_TOMATO_VALUE = "tomato";
419
    String CSS_TOP_VALUE = "top";
419
    final static String CSS_TOP_VALUE = "top";
420
    String CSS_TURQUOISE_VALUE = "turquoise";
420
    final static String CSS_TURQUOISE_VALUE = "turquoise";
421
    String CSS_ULTRA_CONDENSED_VALUE = "ultra-condensed";
421
    final static String CSS_ULTRA_CONDENSED_VALUE = "ultra-condensed";
422
    String CSS_ULTRA_EXPANDED_VALUE = "ultra-expanded";
422
    final static String CSS_ULTRA_EXPANDED_VALUE = "ultra-expanded";
423
    String CSS_UNDERLINE_VALUE = "underline";
423
    final static String CSS_UNDERLINE_VALUE = "underline";
424
    String CSS_USE_SCRIPT_VALUE = "use-script";
424
    final static String CSS_USE_SCRIPT_VALUE = "use-script";
425
    String CSS_VIOLET_VALUE = "violet";
425
    final static String CSS_VIOLET_VALUE = "violet";
426
    String CSS_VISIBLEFILLSTROKE_VALUE = "visiblefillstroke";
426
    final static String CSS_VISIBLEFILLSTROKE_VALUE = "visiblefillstroke";
427
    String CSS_VISIBLEFILL_VALUE = "visiblefill";
427
    final static String CSS_VISIBLEFILL_VALUE = "visiblefill";
428
    String CSS_VISIBLEPAINTED_VALUE = "visiblepainted";
428
    final static String CSS_VISIBLEPAINTED_VALUE = "visiblepainted";
429
    String CSS_VISIBLESTROKE_VALUE = "visiblestroke";
429
    final static String CSS_VISIBLESTROKE_VALUE = "visiblestroke";
430
    String CSS_VISIBLE_VALUE = "visible";
430
    final static String CSS_VISIBLE_VALUE = "visible";
431
    String CSS_WAIT_VALUE = "wait";
431
    final static String CSS_WAIT_VALUE = "wait";
432
    String CSS_WHEAT_VALUE = "wheat";
432
    final static String CSS_WHEAT_VALUE = "wheat";
433
    String CSS_WHITESMOKE_VALUE = "whitesmoke";
433
    final static String CSS_WHITESMOKE_VALUE = "whitesmoke";
434
    String CSS_WHITE_VALUE = "white";
434
    final static String CSS_WHITE_VALUE = "white";
435
    String CSS_WIDER_VALUE = "wider";
435
    final static String CSS_WIDER_VALUE = "wider";
436
    String CSS_WINDOWFRAME_VALUE = "windowframe";
436
    final static String CSS_WINDOWFRAME_VALUE = "windowframe";
437
    String CSS_WINDOWTEXT_VALUE = "windowtext";
437
    final static String CSS_WINDOWTEXT_VALUE = "windowtext";
438
    String CSS_WINDOW_VALUE = "window";
438
    final static String CSS_WINDOW_VALUE = "window";
439
    String CSS_W_RESIZE_VALUE = "w-resize";
439
    final static String CSS_W_RESIZE_VALUE = "w-resize";
440
    String CSS_XX_LARGE_VALUE = "xx-large";
440
    final static String CSS_XX_LARGE_VALUE = "xx-large";
441
    String CSS_XX_SMALL_VALUE = "xx-small";
441
    final static String CSS_XX_SMALL_VALUE = "xx-small";
442
    String CSS_X_LARGE_VALUE = "x-large";
442
    final static String CSS_X_LARGE_VALUE = "x-large";
443
    String CSS_X_SMALL_VALUE = "x-small";
443
    final static String CSS_X_SMALL_VALUE = "x-small";
444
    String CSS_YELLOWGREEN_VALUE = "yellowgreen";
444
    final static String CSS_YELLOWGREEN_VALUE = "yellowgreen";
445
    String CSS_YELLOW_VALUE = "yellow";
445
    final static String CSS_YELLOW_VALUE = "yellow";
446
447
    /** SVG 1.2 CSS constants */
448
    final static String CSS_RENDERING_COLOR_SPACE_PROPERTY = "rendering-color-space";
446
449
447
}
450
}
(-)sources/org/apache/batik/util/SVGConstants.java (-584 / +584 lines)
Lines 60-79 Link Here
60
 */
60
 */
61
public interface SVGConstants extends CSSConstants {
61
public interface SVGConstants extends CSSConstants {
62
62
63
    String TAG_TEXT_PATH = "textPath";
63
    final static String TAG_TEXT_PATH = "textPath";
64
    String ATTR_ID = "id";
64
    final static String ATTR_ID = "id";
65
65
66
    /////////////////////////////////////////////////////////////////////////
66
    /////////////////////////////////////////////////////////////////////////
67
    // SVG general
67
    // SVG general
68
    /////////////////////////////////////////////////////////////////////////
68
    /////////////////////////////////////////////////////////////////////////
69
69
70
    String SVG_PUBLIC_ID =
70
    final static String SVG_PUBLIC_ID =
71
        "-//W3C//DTD SVG 1.0//EN";
71
        "-//W3C//DTD SVG 1.0//EN";
72
    String SVG_SYSTEM_ID =
72
    final static String SVG_SYSTEM_ID =
73
        "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd";
73
        "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd";
74
    String SVG_NAMESPACE_URI =
74
    final static String SVG_NAMESPACE_URI =
75
        "http://www.w3.org/2000/svg";
75
        "http://www.w3.org/2000/svg";
76
    String SVG_VERSION =
76
    final static String SVG_VERSION =
77
        "1.0";
77
        "1.0";
78
78
79
    //////////////////////////////////////////////////////////////////////////
79
    //////////////////////////////////////////////////////////////////////////
Lines 83-880 Link Here
83
    /**
83
    /**
84
     * The event type for MouseEvent.
84
     * The event type for MouseEvent.
85
     */
85
     */
86
    String SVG_MOUSEEVENTS_EVENT_TYPE = "MouseEvents";
86
    final static String SVG_MOUSEEVENTS_EVENT_TYPE = "MouseEvents";
87
87
88
    /**
88
    /**
89
     * The event type for UIEvent.
89
     * The event type for UIEvent.
90
     */
90
     */
91
    String SVG_UIEVENTS_EVENT_TYPE = "UIEvents";
91
    final static String SVG_UIEVENTS_EVENT_TYPE = "UIEvents";
92
92
93
    /**
93
    /**
94
     * The event type for SVGEvent.
94
     * The event type for SVGEvent.
95
     */
95
     */
96
    String SVG_SVGEVENTS_EVENT_TYPE = "SVGEvents";
96
    final static String SVG_SVGEVENTS_EVENT_TYPE = "SVGEvents";
97
97
98
    /**
98
    /**
99
     * The event type for KeyEvent.
99
     * The event type for KeyEvent.
100
     */
100
     */
101
    String SVG_KEYEVENTS_EVENT_TYPE = "KeyEvents";
101
    final static String SVG_KEYEVENTS_EVENT_TYPE = "KeyEvents";
102
102
103
    // ---------------------------------------------------------------------
103
    // ---------------------------------------------------------------------
104
104
105
    /**
105
    /**
106
     * The event type for 'keydown' KeyEvent.
106
     * The event type for 'keydown' KeyEvent.
107
     */
107
     */
108
    String SVG_KEYDOWN_EVENT_TYPE = "keydown";
108
    final static String SVG_KEYDOWN_EVENT_TYPE = "keydown";
109
109
110
    /**
110
    /**
111
     * The event type for 'keypress' KeyEvent.
111
     * The event type for 'keypress' KeyEvent.
112
     */
112
     */
113
    String SVG_KEYPRESS_EVENT_TYPE = "keypress";
113
    final static String SVG_KEYPRESS_EVENT_TYPE = "keypress";
114
114
115
    /**
115
    /**
116
     * The event type for 'keyup' KeyEvent.
116
     * The event type for 'keyup' KeyEvent.
117
     */
117
     */
118
    String SVG_KEYUP_EVENT_TYPE = "keyup";
118
    final static String SVG_KEYUP_EVENT_TYPE = "keyup";
119
119
120
    /**
120
    /**
121
     * The event type for 'click' MouseEvent.
121
     * The event type for 'click' MouseEvent.
122
     */
122
     */
123
    String SVG_CLICK_EVENT_TYPE = "click";
123
    final static String SVG_CLICK_EVENT_TYPE = "click";
124
124
125
    /**
125
    /**
126
     * The event type for 'mouseup' MouseEvent.
126
     * The event type for 'mouseup' MouseEvent.
127
     */
127
     */
128
    String SVG_MOUSEUP_EVENT_TYPE = "mouseup";
128
    final static String SVG_MOUSEUP_EVENT_TYPE = "mouseup";
129
129
130
    /**
130
    /**
131
     * The event type for 'mousedown' MouseEvent.
131
     * The event type for 'mousedown' MouseEvent.
132
     */
132
     */
133
    String SVG_MOUSEDOWN_EVENT_TYPE = "mousedown";
133
    final static String SVG_MOUSEDOWN_EVENT_TYPE = "mousedown";
134
134
135
    /**
135
    /**
136
     * The event type for 'mousemove' MouseEvent.
136
     * The event type for 'mousemove' MouseEvent.
137
     */
137
     */
138
    String SVG_MOUSEMOVE_EVENT_TYPE = "mousemove";
138
    final static String SVG_MOUSEMOVE_EVENT_TYPE = "mousemove";
139
139
140
    /**
140
    /**
141
     * The event type for 'mouseout' MouseEvent.
141
     * The event type for 'mouseout' MouseEvent.
142
     */
142
     */
143
    String SVG_MOUSEOUT_EVENT_TYPE = "mouseout";
143
    final static String SVG_MOUSEOUT_EVENT_TYPE = "mouseout";
144
144
145
    /**
145
    /**
146
     * The event type for 'mouseover' MouseEvent.
146
     * The event type for 'mouseover' MouseEvent.
147
     */
147
     */
148
    String SVG_MOUSEOVER_EVENT_TYPE = "mouseover";
148
    final static String SVG_MOUSEOVER_EVENT_TYPE = "mouseover";
149
149
150
    /**
150
    /**
151
     * The event type for 'DOMFocusIn' UIEvent.
151
     * The event type for 'DOMFocusIn' UIEvent.
152
     */
152
     */
153
    String SVG_DOMFOCUSIN_EVENT_TYPE = "DOMFocusIn";
153
    final static String SVG_DOMFOCUSIN_EVENT_TYPE = "DOMFocusIn";
154
154
155
    /**
155
    /**
156
     * The event type for 'DOMFocusOut' UIEvent.
156
     * The event type for 'DOMFocusOut' UIEvent.
157
     */
157
     */
158
    String SVG_DOMFOCUSOUT_EVENT_TYPE = "DOMFocusOut";
158
    final static String SVG_DOMFOCUSOUT_EVENT_TYPE = "DOMFocusOut";
159
159
160
    /**
160
    /**
161
     * The event type for 'DOMActivate' UIEvent.
161
     * The event type for 'DOMActivate' UIEvent.
162
     */
162
     */
163
    String SVG_DOMACTIVATE_EVENT_TYPE = "DOMActivate";
163
    final static String SVG_DOMACTIVATE_EVENT_TYPE = "DOMActivate";
164
164
165
    /**
165
    /**
166
     * The event type for 'SVGLoad' SVGEvent.
166
     * The event type for 'SVGLoad' SVGEvent.
167
     */
167
     */
168
    String SVG_SVGLOAD_EVENT_TYPE = "SVGLoad";
168
    final static String SVG_SVGLOAD_EVENT_TYPE = "SVGLoad";
169
169
170
    /**
170
    /**
171
     * The event type for 'SVGUnload' SVGEvent.
171
     * The event type for 'SVGUnload' SVGEvent.
172
     */
172
     */
173
    String SVG_SVGUNLOAD_EVENT_TYPE = "SVGUnload";
173
    final static String SVG_SVGUNLOAD_EVENT_TYPE = "SVGUnload";
174
174
175
    /**
175
    /**
176
     * The event type for 'SVGAbort' SVGEvent.
176
     * The event type for 'SVGAbort' SVGEvent.
177
     */
177
     */
178
    String SVG_SVGABORT_EVENT_TYPE = "SVGAbort";
178
    final static String SVG_SVGABORT_EVENT_TYPE = "SVGAbort";
179
179
180
    /**
180
    /**
181
     * The event type for 'SVGError' SVGEvent.
181
     * The event type for 'SVGError' SVGEvent.
182
     */
182
     */
183
    String SVG_SVGERROR_EVENT_TYPE = "SVGError";
183
    final static String SVG_SVGERROR_EVENT_TYPE = "SVGError";
184
184
185
    /**
185
    /**
186
     * The event type for 'SVGResize' SVGEvent.
186
     * The event type for 'SVGResize' SVGEvent.
187
     */
187
     */
188
    String SVG_SVGRESIZE_EVENT_TYPE = "SVGResize";
188
    final static String SVG_SVGRESIZE_EVENT_TYPE = "SVGResize";
189
189
190
    /**
190
    /**
191
     * The event type for 'SVGScroll' SVGEvent.
191
     * The event type for 'SVGScroll' SVGEvent.
192
     */
192
     */
193
    String SVG_SVGSCROLL_EVENT_TYPE = "SVGScroll";
193
    final static String SVG_SVGSCROLL_EVENT_TYPE = "SVGScroll";
194
194
195
    /**
195
    /**
196
     * The event type for 'SVGZoom' SVGEvent.
196
     * The event type for 'SVGZoom' SVGEvent.
197
     */
197
     */
198
    String SVG_SVGZOOM_EVENT_TYPE = "SVGZoom";
198
    final static String SVG_SVGZOOM_EVENT_TYPE = "SVGZoom";
199
199
200
    // ---------------------------------------------------------------------
200
    // ---------------------------------------------------------------------
201
201
202
    /**
202
    /**
203
     * The 'onkeyup' attribute name of type KeyEvents.
203
     * The 'onkeyup' attribute name of type KeyEvents.
204
     */
204
     */
205
    String SVG_ONKEYUP_ATTRIBUTE = "onkeyup";
205
    final static String SVG_ONKEYUP_ATTRIBUTE = "onkeyup";
206
206
207
    /**
207
    /**
208
     * The 'onkeydown' attribute name of type KeyEvents.
208
     * The 'onkeydown' attribute name of type KeyEvents.
209
     */
209
     */
210
    String SVG_ONKEYDOWN_ATTRIBUTE = "onkeydown";
210
    final static String SVG_ONKEYDOWN_ATTRIBUTE = "onkeydown";
211
211
212
    /**
212
    /**
213
     * The 'onkeypress' attribute name of type KeyEvents.
213
     * The 'onkeypress' attribute name of type KeyEvents.
214
     */
214
     */
215
    String SVG_ONKEYPRESS_ATTRIBUTE = "onkeypress";
215
    final static String SVG_ONKEYPRESS_ATTRIBUTE = "onkeypress";
216
216
217
    /**
217
    /**
218
     * The 'onabort' attribute name of type SVGEvents.
218
     * The 'onabort' attribute name of type SVGEvents.
219
     */
219
     */
220
    String SVG_ONABORT_ATTRIBUTE = "onabort";
220
    final static String SVG_ONABORT_ATTRIBUTE = "onabort";
221
221
222
    /**
222
    /**
223
     * The 'onabort' attribute name of type SVGEvents.
223
     * The 'onabort' attribute name of type SVGEvents.
224
     */
224
     */
225
    String SVG_ONACTIVATE_ATTRIBUTE = "onactivate";
225
    final static String SVG_ONACTIVATE_ATTRIBUTE = "onactivate";
226
226
227
    /**
227
    /**
228
     * The 'onbegin' attribute name of type SVGEvents.
228
     * The 'onbegin' attribute name of type SVGEvents.
229
     */
229
     */
230
    String SVG_ONBEGIN_ATTRIBUTE = "onbegin";
230
    final static String SVG_ONBEGIN_ATTRIBUTE = "onbegin";
231
231
232
    /**
232
    /**
233
     * The 'onclick' attribute name of type MouseEvents.
233
     * The 'onclick' attribute name of type MouseEvents.
234
     */
234
     */
235
    String SVG_ONCLICK_ATTRIBUTE = "onclick";
235
    final static String SVG_ONCLICK_ATTRIBUTE = "onclick";
236
236
237
    /**
237
    /**
238
     * The 'onend' attribute name of type SVGEvents.
238
     * The 'onend' attribute name of type SVGEvents.
239
     */
239
     */
240
    String SVG_ONEND_ATTRIBUTE = "onend";
240
    final static String SVG_ONEND_ATTRIBUTE = "onend";
241
241
242
    /**
242
    /**
243
     * The 'onerror' attribute name of type SVGEvents.
243
     * The 'onerror' attribute name of type SVGEvents.
244
     */
244
     */
245
    String SVG_ONERROR_ATTRIBUTE = "onerror";
245
    final static String SVG_ONERROR_ATTRIBUTE = "onerror";
246
246
247
    /**
247
    /**
248
     * The 'onfocusin' attribute name of type UIEvents.
248
     * The 'onfocusin' attribute name of type UIEvents.
249
     */
249
     */
250
    String SVG_ONFOCUSIN_ATTRIBUTE = "onfocusin";
250
    final static String SVG_ONFOCUSIN_ATTRIBUTE = "onfocusin";
251
251
252
    /**
252
    /**
253
     * The 'onfocusout' attribute name of type UIEvents.
253
     * The 'onfocusout' attribute name of type UIEvents.
254
     */
254
     */
255
    String SVG_ONFOCUSOUT_ATTRIBUTE = "onfocusout";
255
    final static String SVG_ONFOCUSOUT_ATTRIBUTE = "onfocusout";
256
256
257
    /**
257
    /**
258
     * The 'onload' attribute name of type SVGEvents.
258
     * The 'onload' attribute name of type SVGEvents.
259
     */
259
     */
260
    String SVG_ONLOAD_ATTRIBUTE = "onload";
260
    final static String SVG_ONLOAD_ATTRIBUTE = "onload";
261
261
262
    /**
262
    /**
263
     * The 'onmousedown' attribute name of type MouseEvents.
263
     * The 'onmousedown' attribute name of type MouseEvents.
264
     */
264
     */
265
    String SVG_ONMOUSEDOWN_ATTRIBUTE = "onmousedown";
265
    final static String SVG_ONMOUSEDOWN_ATTRIBUTE = "onmousedown";
266
266
267
    /**
267
    /**
268
     * The 'onmousemove' attribute name of type MouseEvents.
268
     * The 'onmousemove' attribute name of type MouseEvents.
269
     */
269
     */
270
    String SVG_ONMOUSEMOVE_ATTRIBUTE = "onmousemove";
270
    final static String SVG_ONMOUSEMOVE_ATTRIBUTE = "onmousemove";
271
271
272
    /**
272
    /**
273
     * The 'onmouseout' attribute name of type MouseEvents.
273
     * The 'onmouseout' attribute name of type MouseEvents.
274
     */
274
     */
275
    String SVG_ONMOUSEOUT_ATTRIBUTE = "onmouseout";
275
    final static String SVG_ONMOUSEOUT_ATTRIBUTE = "onmouseout";
276
276
277
    /**
277
    /**
278
     * The 'onmouseover' attribute name of type MouseEvents.
278
     * The 'onmouseover' attribute name of type MouseEvents.
279
     */
279
     */
280
    String SVG_ONMOUSEOVER_ATTRIBUTE = "onmouseover";
280
    final static String SVG_ONMOUSEOVER_ATTRIBUTE = "onmouseover";
281
281
282
    /**
282
    /**
283
     * The 'onmouseup' attribute name of type MouseEvents.
283
     * The 'onmouseup' attribute name of type MouseEvents.
284
     */
284
     */
285
    String SVG_ONMOUSEUP_ATTRIBUTE = "onmouseup";
285
    final static String SVG_ONMOUSEUP_ATTRIBUTE = "onmouseup";
286
286
287
    /**
287
    /**
288
     * The 'onrepeat' attribute name of type SVGEvents.
288
     * The 'onrepeat' attribute name of type SVGEvents.
289
     */
289
     */
290
    String SVG_ONREPEAT_ATTRIBUTE = "onrepeat";
290
    final static String SVG_ONREPEAT_ATTRIBUTE = "onrepeat";
291
291
292
    /**
292
    /**
293
     * The 'onresize' attribute name of type SVGEvents.
293
     * The 'onresize' attribute name of type SVGEvents.
294
     */
294
     */
295
    String SVG_ONRESIZE_ATTRIBUTE = "onresize";
295
    final static String SVG_ONRESIZE_ATTRIBUTE = "onresize";
296
296
297
    /**
297
    /**
298
     * The 'onscroll' attribute name of type SVGEvents.
298
     * The 'onscroll' attribute name of type SVGEvents.
299
     */
299
     */
300
    String SVG_ONSCROLL_ATTRIBUTE = "onscroll";
300
    final static String SVG_ONSCROLL_ATTRIBUTE = "onscroll";
301
 
301
 
302
    /**
302
    /**
303
     * The 'onunload' attribute name of type SVGEvents.
303
     * The 'onunload' attribute name of type SVGEvents.
304
     */
304
     */
305
    String SVG_ONUNLOAD_ATTRIBUTE = "onunload";
305
    final static String SVG_ONUNLOAD_ATTRIBUTE = "onunload";
306
306
307
    /**
307
    /**
308
     * The 'onzoom' attribute name of type SVGEvents.
308
     * The 'onzoom' attribute name of type SVGEvents.
309
     */
309
     */
310
    String SVG_ONZOOM_ATTRIBUTE = "onzoom";
310
    final static String SVG_ONZOOM_ATTRIBUTE = "onzoom";
311
311
312
    /////////////////////////////////////////////////////////////////////////
312
    /////////////////////////////////////////////////////////////////////////
313
    // SVG features
313
    // SVG features
314
    /////////////////////////////////////////////////////////////////////////
314
    /////////////////////////////////////////////////////////////////////////
315
315
316
    String SVG_ORG_W3C_SVG_FEATURE = "org.w3c.svg";
316
    final static String SVG_ORG_W3C_SVG_FEATURE = "org.w3c.svg";
317
    String SVG_ORG_W3C_SVG_LANG_FEATURE = "org.w3c.svg.lang";
317
    final static String SVG_ORG_W3C_SVG_LANG_FEATURE = "org.w3c.svg.lang";
318
    String SVG_ORG_W3C_SVG_STATIC_FEATURE = "org.w3c.svg.static";
318
    final static String SVG_ORG_W3C_SVG_STATIC_FEATURE = "org.w3c.svg.static";
319
319
320
    /////////////////////////////////////////////////////////////////////////
320
    /////////////////////////////////////////////////////////////////////////
321
    // SVG tags
321
    // SVG tags
322
    /////////////////////////////////////////////////////////////////////////
322
    /////////////////////////////////////////////////////////////////////////
323
323
324
    String SVG_A_TAG = "a";
324
    final static String SVG_A_TAG = "a";
325
    String SVG_ALT_GLYPH_TAG = "altGlyph";
325
    final static String SVG_ALT_GLYPH_TAG = "altGlyph";
326
    String SVG_ALT_GLYPH_DEF_TAG = "altGlyphDef";
326
    final static String SVG_ALT_GLYPH_DEF_TAG = "altGlyphDef";
327
    String SVG_ALT_GLYPH_ITEM_TAG = "altGlyphItem";
327
    final static String SVG_ALT_GLYPH_ITEM_TAG = "altGlyphItem";
328
    String SVG_ANIMATE_TAG = "animate";
328
    final static String SVG_ANIMATE_TAG = "animate";
329
    String SVG_ANIMATE_COLOR_TAG = "animateColor";
329
    final static String SVG_ANIMATE_COLOR_TAG = "animateColor";
330
    String SVG_ANIMATE_MOTION_TAG = "animateMotion";
330
    final static String SVG_ANIMATE_MOTION_TAG = "animateMotion";
331
    String SVG_ANIMATE_TRANSFORM_TAG = "animateTransform";
331
    final static String SVG_ANIMATE_TRANSFORM_TAG = "animateTransform";
332
    String SVG_CIRCLE_TAG = "circle";
332
    final static String SVG_CIRCLE_TAG = "circle";
333
    String SVG_CLIP_PATH_TAG = "clipPath";
333
    final static String SVG_CLIP_PATH_TAG = "clipPath";
334
    String SVG_COLOR_PROFILE_TAG = "color-profile";
334
    final static String SVG_COLOR_PROFILE_TAG = "color-profile";
335
    String SVG_CURSOR_TAG = "cursor";
335
    final static String SVG_CURSOR_TAG = "cursor";
336
    String SVG_DEFINITION_SRC_TAG = "definition-src";
336
    final static String SVG_DEFINITION_SRC_TAG = "definition-src";
337
    String SVG_DEFS_TAG = "defs";
337
    final static String SVG_DEFS_TAG = "defs";
338
    String SVG_DESC_TAG = "desc";
338
    final static String SVG_DESC_TAG = "desc";
339
    String SVG_ELLIPSE_TAG = "ellipse";
339
    final static String SVG_ELLIPSE_TAG = "ellipse";
340
    String SVG_FE_BLEND_TAG = "feBlend";
340
    final static String SVG_FE_BLEND_TAG = "feBlend";
341
    String SVG_FE_COLOR_MATRIX_TAG = "feColorMatrix";
341
    final static String SVG_FE_COLOR_MATRIX_TAG = "feColorMatrix";
342
    String SVG_FE_COMPONENT_TRANSFER_TAG = "feComponentTransfer";
342
    final static String SVG_FE_COMPONENT_TRANSFER_TAG = "feComponentTransfer";
343
    String SVG_FE_COMPOSITE_TAG = "feComposite";
343
    final static String SVG_FE_COMPOSITE_TAG = "feComposite";
344
    String SVG_FE_CONVOLVE_MATRIX_TAG = "feConvolveMatrix";
344
    final static String SVG_FE_CONVOLVE_MATRIX_TAG = "feConvolveMatrix";
345
    String SVG_FE_DIFFUSE_LIGHTING_TAG = "feDiffuseLighting";
345
    final static String SVG_FE_DIFFUSE_LIGHTING_TAG = "feDiffuseLighting";
346
    String SVG_FE_DISPLACEMENT_MAP_TAG = "feDisplacementMap";
346
    final static String SVG_FE_DISPLACEMENT_MAP_TAG = "feDisplacementMap";
347
    String SVG_FE_DISTANT_LIGHT_TAG = "feDistantLight";
347
    final static String SVG_FE_DISTANT_LIGHT_TAG = "feDistantLight";
348
    String SVG_FE_FLOOD_TAG = "feFlood";
348
    final static String SVG_FE_FLOOD_TAG = "feFlood";
349
    String SVG_FE_FUNC_A_TAG = "feFuncA";
349
    final static String SVG_FE_FUNC_A_TAG = "feFuncA";
350
    String SVG_FE_FUNC_B_TAG = "feFuncB";
350
    final static String SVG_FE_FUNC_B_TAG = "feFuncB";
351
    String SVG_FE_FUNC_G_TAG = "feFuncG";
351
    final static String SVG_FE_FUNC_G_TAG = "feFuncG";
352
    String SVG_FE_FUNC_R_TAG = "feFuncR";
352
    final static String SVG_FE_FUNC_R_TAG = "feFuncR";
353
    String SVG_FE_GAUSSIAN_BLUR_TAG = "feGaussianBlur";
353
    final static String SVG_FE_GAUSSIAN_BLUR_TAG = "feGaussianBlur";
354
    String SVG_FE_IMAGE_TAG = "feImage";
354
    final static String SVG_FE_IMAGE_TAG = "feImage";
355
    String SVG_FE_MERGE_NODE_TAG = "feMergeNode";
355
    final static String SVG_FE_MERGE_NODE_TAG = "feMergeNode";
356
    String SVG_FE_MERGE_TAG = "feMerge";
356
    final static String SVG_FE_MERGE_TAG = "feMerge";
357
    String SVG_FE_MORPHOLOGY_TAG = "feMorphology";
357
    final static String SVG_FE_MORPHOLOGY_TAG = "feMorphology";
358
    String SVG_FE_OFFSET_TAG = "feOffset";
358
    final static String SVG_FE_OFFSET_TAG = "feOffset";
359
    String SVG_FE_POINT_LIGHT_TAG = "fePointLight";
359
    final static String SVG_FE_POINT_LIGHT_TAG = "fePointLight";
360
    String SVG_FE_SPECULAR_LIGHTING_TAG = "feSpecularLighting";
360
    final static String SVG_FE_SPECULAR_LIGHTING_TAG = "feSpecularLighting";
361
    String SVG_FE_SPOT_LIGHT_TAG = "feSpotLight";
361
    final static String SVG_FE_SPOT_LIGHT_TAG = "feSpotLight";
362
    String SVG_FE_TILE_TAG = "feTile";
362
    final static String SVG_FE_TILE_TAG = "feTile";
363
    String SVG_FE_TURBULENCE_TAG = "feTurbulence";
363
    final static String SVG_FE_TURBULENCE_TAG = "feTurbulence";
364
    String SVG_FILTER_TAG = "filter";
364
    final static String SVG_FILTER_TAG = "filter";
365
    String SVG_FONT_TAG = "font";
365
    final static String SVG_FONT_TAG = "font";
366
    String SVG_FONT_FACE_TAG = "font-face";
366
    final static String SVG_FONT_FACE_TAG = "font-face";
367
    String SVG_FONT_FACE_FORMAT_TAG = "font-face-format";
367
    final static String SVG_FONT_FACE_FORMAT_TAG = "font-face-format";
368
    String SVG_FONT_FACE_NAME_TAG = "font-face-name";
368
    final static String SVG_FONT_FACE_NAME_TAG = "font-face-name";
369
    String SVG_FONT_FACE_SRC_TAG = "font-face-src";
369
    final static String SVG_FONT_FACE_SRC_TAG = "font-face-src";
370
    String SVG_FONT_FACE_URI_TAG = "font-face-uri";
370
    final static String SVG_FONT_FACE_URI_TAG = "font-face-uri";
371
    String SVG_FOREIGN_OBJECT_TAG = "foreignObject";
371
    final static String SVG_FOREIGN_OBJECT_TAG = "foreignObject";
372
    String SVG_G_TAG = "g";
372
    final static String SVG_G_TAG = "g";
373
    String SVG_GLYPH_TAG = "glyph";
373
    final static String SVG_GLYPH_TAG = "glyph";
374
    String SVG_GLYPH_REF_TAG = "glyphRef";
374
    final static String SVG_GLYPH_REF_TAG = "glyphRef";
375
    String SVG_HKERN_TAG = "hkern";
375
    final static String SVG_HKERN_TAG = "hkern";
376
    String SVG_IMAGE_TAG = "image";
376
    final static String SVG_IMAGE_TAG = "image";
377
    String SVG_LINE_TAG = "line";
377
    final static String SVG_LINE_TAG = "line";
378
    String SVG_LINEAR_GRADIENT_TAG = "linearGradient";
378
    final static String SVG_LINEAR_GRADIENT_TAG = "linearGradient";
379
    String SVG_MARKER_TAG = "marker";
379
    final static String SVG_MARKER_TAG = "marker";
380
    String SVG_MASK_TAG = "mask";
380
    final static String SVG_MASK_TAG = "mask";
381
    String SVG_METADATA_TAG = "metadata";
381
    final static String SVG_METADATA_TAG = "metadata";
382
    String SVG_MISSING_GLYPH_TAG = "missing-glyph";
382
    final static String SVG_MISSING_GLYPH_TAG = "missing-glyph";
383
    String SVG_MPATH_TAG = "mpath";
383
    final static String SVG_MPATH_TAG = "mpath";
384
    String SVG_PATH_TAG = "path";
384
    final static String SVG_PATH_TAG = "path";
385
    String SVG_PATTERN_TAG = "pattern";
385
    final static String SVG_PATTERN_TAG = "pattern";
386
    String SVG_POLYGON_TAG = "polygon";
386
    final static String SVG_POLYGON_TAG = "polygon";
387
    String SVG_POLYLINE_TAG = "polyline";
387
    final static String SVG_POLYLINE_TAG = "polyline";
388
    String SVG_RADIAL_GRADIENT_TAG = "radialGradient";
388
    final static String SVG_RADIAL_GRADIENT_TAG = "radialGradient";
389
    String SVG_RECT_TAG = "rect";
389
    final static String SVG_RECT_TAG = "rect";
390
    String SVG_SET_TAG = "set";
390
    final static String SVG_SET_TAG = "set";
391
    String SVG_SCRIPT_TAG = "script";
391
    final static String SVG_SCRIPT_TAG = "script";
392
    String SVG_STOP_TAG = "stop";
392
    final static String SVG_STOP_TAG = "stop";
393
    String SVG_STYLE_TAG = "style";
393
    final static String SVG_STYLE_TAG = "style";
394
    String SVG_SVG_TAG = "svg";
394
    final static String SVG_SVG_TAG = "svg";
395
    String SVG_SWITCH_TAG = "switch";
395
    final static String SVG_SWITCH_TAG = "switch";
396
    String SVG_SYMBOL_TAG = "symbol";
396
    final static String SVG_SYMBOL_TAG = "symbol";
397
    String SVG_TEXT_PATH_TAG = "textPath";
397
    final static String SVG_TEXT_PATH_TAG = "textPath";
398
    String SVG_TEXT_TAG = "text";
398
    final static String SVG_TEXT_TAG = "text";
399
    String SVG_TITLE_TAG = "title";
399
    final static String SVG_TITLE_TAG = "title";
400
    String SVG_TREF_TAG = "tref";
400
    final static String SVG_TREF_TAG = "tref";
401
    String SVG_TSPAN_TAG = "tspan";
401
    final static String SVG_TSPAN_TAG = "tspan";
402
    String SVG_USE_TAG = "use";
402
    final static String SVG_USE_TAG = "use";
403
    String SVG_VIEW_TAG = "view";
403
    final static String SVG_VIEW_TAG = "view";
404
    String SVG_VKERN_TAG = "vkern";
404
    final static String SVG_VKERN_TAG = "vkern";
405
405
406
    /////////////////////////////////////////////////////////////////////////
406
    /////////////////////////////////////////////////////////////////////////
407
    // SVG attributes
407
    // SVG attributes
408
    /////////////////////////////////////////////////////////////////////////
408
    /////////////////////////////////////////////////////////////////////////
409
409
410
    String SVG_ACCENT_HEIGHT_ATTRIBUTE = "accent-height";
410
    final static String SVG_ACCENT_HEIGHT_ATTRIBUTE = "accent-height";
411
    String SVG_AMPLITUDE_ATTRIBUTE = "amplitude";
411
    final static String SVG_AMPLITUDE_ATTRIBUTE = "amplitude";
412
    String SVG_ARABIC_FORM_ATTRIBUTE = "arabic-form";
412
    final static String SVG_ARABIC_FORM_ATTRIBUTE = "arabic-form";
413
    String SVG_ASCENT_ATTRIBUTE = "ascent";
413
    final static String SVG_ASCENT_ATTRIBUTE = "ascent";
414
    String SVG_AZIMUTH_ATTRIBUTE = "azimuth";
414
    final static String SVG_AZIMUTH_ATTRIBUTE = "azimuth";
415
    String SVG_ALPHABETIC_ATTRIBUTE = "alphabetic";
415
    final static String SVG_ALPHABETIC_ATTRIBUTE = "alphabetic";
416
    String SVG_BASE_FREQUENCY_ATTRIBUTE = "baseFrequency";
416
    final static String SVG_BASE_FREQUENCY_ATTRIBUTE = "baseFrequency";
417
    String SVG_BBOX_ATTRIBUTE = "bbox";
417
    final static String SVG_BBOX_ATTRIBUTE = "bbox";
418
    String SVG_BIAS_ATTRIBUTE = "bias";
418
    final static String SVG_BIAS_ATTRIBUTE = "bias";
419
    String SVG_CALC_MODE_ATTRIBUTE = "calcMode";
419
    final static String SVG_CALC_MODE_ATTRIBUTE = "calcMode";
420
    String SVG_CAP_HEIGHT_ATTRIBUTE = "cap-height";
420
    final static String SVG_CAP_HEIGHT_ATTRIBUTE = "cap-height";
421
    String SVG_CLASS_ATTRIBUTE = "class";
421
    final static String SVG_CLASS_ATTRIBUTE = "class";
422
    String SVG_CLIP_PATH_ATTRIBUTE = CSS_CLIP_PATH_PROPERTY;
422
    final static String SVG_CLIP_PATH_ATTRIBUTE = CSS_CLIP_PATH_PROPERTY;
423
    String SVG_CLIP_PATH_UNITS_ATTRIBUTE = "clipPathUnits";
423
    final static String SVG_CLIP_PATH_UNITS_ATTRIBUTE = "clipPathUnits";
424
    String SVG_COLOR_INTERPOLATION_ATTRIBUTE = CSS_COLOR_INTERPOLATION_PROPERTY;
424
    final static String SVG_COLOR_INTERPOLATION_ATTRIBUTE = CSS_COLOR_INTERPOLATION_PROPERTY;
425
    String SVG_COLOR_RENDERING_ATTRIBUTE = CSS_COLOR_RENDERING_PROPERTY;
425
    final static String SVG_COLOR_RENDERING_ATTRIBUTE = CSS_COLOR_RENDERING_PROPERTY;
426
    String SVG_CONTENT_SCRIPT_TYPE_ATTRIBUTE = "contentScriptType";
426
    final static String SVG_CONTENT_SCRIPT_TYPE_ATTRIBUTE = "contentScriptType";
427
    String SVG_CONTENT_STYLE_TYPE_ATTRIBUTE = "contentStyleType";
427
    final static String SVG_CONTENT_STYLE_TYPE_ATTRIBUTE = "contentStyleType";
428
    String SVG_CX_ATTRIBUTE = "cx";
428
    final static String SVG_CX_ATTRIBUTE = "cx";
429
    String SVG_CY_ATTRIBUTE = "cy";
429
    final static String SVG_CY_ATTRIBUTE = "cy";
430
    String SVG_DESCENT_ATTRIBUTE = "descent";
430
    final static String SVG_DESCENT_ATTRIBUTE = "descent";
431
    String SVG_DIFFUSE_CONSTANT_ATTRIBUTE = "diffuseConstant";
431
    final static String SVG_DIFFUSE_CONSTANT_ATTRIBUTE = "diffuseConstant";
432
    String SVG_DIVISOR_ATTRIBUTE = "divisor";
432
    final static String SVG_DIVISOR_ATTRIBUTE = "divisor";
433
    String SVG_DX_ATTRIBUTE = "dx";
433
    final static String SVG_DX_ATTRIBUTE = "dx";
434
    String SVG_DY_ATTRIBUTE = "dy";
434
    final static String SVG_DY_ATTRIBUTE = "dy";
435
    String SVG_D_ATTRIBUTE = "d";
435
    final static String SVG_D_ATTRIBUTE = "d";
436
    String SVG_EDGE_MODE_ATTRIBUTE = "edgeMode";
436
    final static String SVG_EDGE_MODE_ATTRIBUTE = "edgeMode";
437
    String SVG_ELEVATION_ATTRIBUTE = "elevation";
437
    final static String SVG_ELEVATION_ATTRIBUTE = "elevation";
438
    String SVG_ENABLE_BACKGROUND_ATTRIBUTE = CSS_ENABLE_BACKGROUND_PROPERTY;
438
    final static String SVG_ENABLE_BACKGROUND_ATTRIBUTE = CSS_ENABLE_BACKGROUND_PROPERTY;
439
    String SVG_EXPONENT_ATTRIBUTE = "exponent";
439
    final static String SVG_EXPONENT_ATTRIBUTE = "exponent";
440
    String SVG_EXTERNAL_RESOURCES_REQUIRED_ATTRIBUTE = "externalResourcesRequired";
440
    final static String SVG_EXTERNAL_RESOURCES_REQUIRED_ATTRIBUTE = "externalResourcesRequired";
441
    String SVG_FILL_ATTRIBUTE = CSS_FILL_PROPERTY;
441
    final static String SVG_FILL_ATTRIBUTE = CSS_FILL_PROPERTY;
442
    String SVG_FILL_OPACITY_ATTRIBUTE = CSS_FILL_OPACITY_PROPERTY;
442
    final static String SVG_FILL_OPACITY_ATTRIBUTE = CSS_FILL_OPACITY_PROPERTY;
443
    String SVG_FILL_RULE_ATTRIBUTE = CSS_FILL_RULE_PROPERTY;
443
    final static String SVG_FILL_RULE_ATTRIBUTE = CSS_FILL_RULE_PROPERTY;
444
    String SVG_FILTER_ATTRIBUTE = CSS_FILTER_PROPERTY;
444
    final static String SVG_FILTER_ATTRIBUTE = CSS_FILTER_PROPERTY;
445
    String SVG_FILTER_RES_ATTRIBUTE = "filterRes";
445
    final static String SVG_FILTER_RES_ATTRIBUTE = "filterRes";
446
    String SVG_FILTER_UNITS_ATTRIBUTE = "filterUnits";
446
    final static String SVG_FILTER_UNITS_ATTRIBUTE = "filterUnits";
447
    String SVG_FLOOD_COLOR_ATTRIBUTE = CSS_FLOOD_COLOR_PROPERTY;
447
    final static String SVG_FLOOD_COLOR_ATTRIBUTE = CSS_FLOOD_COLOR_PROPERTY;
448
    String SVG_FLOOD_OPACITY_ATTRIBUTE = CSS_FLOOD_OPACITY_PROPERTY;
448
    final static String SVG_FLOOD_OPACITY_ATTRIBUTE = CSS_FLOOD_OPACITY_PROPERTY;
449
    String SVG_FORMAT_ATTRIBUTE = "format";
449
    final static String SVG_FORMAT_ATTRIBUTE = "format";
450
    String SVG_FONT_FAMILY_ATTRIBUTE = CSS_FONT_FAMILY_PROPERTY;
450
    final static String SVG_FONT_FAMILY_ATTRIBUTE = CSS_FONT_FAMILY_PROPERTY;
451
    String SVG_FONT_SIZE_ATTRIBUTE = CSS_FONT_SIZE_PROPERTY;
451
    final static String SVG_FONT_SIZE_ATTRIBUTE = CSS_FONT_SIZE_PROPERTY;
452
    String SVG_FONT_STRETCH_ATTRIBUTE = CSS_FONT_STRETCH_PROPERTY;
452
    final static String SVG_FONT_STRETCH_ATTRIBUTE = CSS_FONT_STRETCH_PROPERTY;
453
    String SVG_FONT_STYLE_ATTRIBUTE = CSS_FONT_STYLE_PROPERTY;
453
    final static String SVG_FONT_STYLE_ATTRIBUTE = CSS_FONT_STYLE_PROPERTY;
454
    String SVG_FONT_VARIANT_ATTRIBUTE = CSS_FONT_VARIANT_PROPERTY;
454
    final static String SVG_FONT_VARIANT_ATTRIBUTE = CSS_FONT_VARIANT_PROPERTY;
455
    String SVG_FONT_WEIGHT_ATTRIBUTE = CSS_FONT_WEIGHT_PROPERTY;
455
    final static String SVG_FONT_WEIGHT_ATTRIBUTE = CSS_FONT_WEIGHT_PROPERTY;
456
    String SVG_FX_ATTRIBUTE = "fx";
456
    final static String SVG_FX_ATTRIBUTE = "fx";
457
    String SVG_FY_ATTRIBUTE = "fy";
457
    final static String SVG_FY_ATTRIBUTE = "fy";
458
    String SVG_G1_ATTRIBUTE = "g1";
458
    final static String SVG_G1_ATTRIBUTE = "g1";
459
    String SVG_G2_ATTRIBUTE = "g2";
459
    final static String SVG_G2_ATTRIBUTE = "g2";
460
    String SVG_GLYPH_NAME_ATTRIBUTE = "glyph-name";
460
    final static String SVG_GLYPH_NAME_ATTRIBUTE = "glyph-name";
461
    String SVG_GLYPH_REF_ATTRIBUTE = "glyphRef";
461
    final static String SVG_GLYPH_REF_ATTRIBUTE = "glyphRef";
462
    String SVG_GRADIENT_TRANSFORM_ATTRIBUTE = "gradientTransform";
462
    final static String SVG_GRADIENT_TRANSFORM_ATTRIBUTE = "gradientTransform";
463
    String SVG_GRADIENT_UNITS_ATTRIBUTE = "gradientUnits";
463
    final static String SVG_GRADIENT_UNITS_ATTRIBUTE = "gradientUnits";
464
    String SVG_HANGING_ATTRIBUTE = "hanging";
464
    final static String SVG_HANGING_ATTRIBUTE = "hanging";
465
    String SVG_HEIGHT_ATTRIBUTE = "height";
465
    final static String SVG_HEIGHT_ATTRIBUTE = "height";
466
    String SVG_HORIZ_ADV_X_ATTRIBUTE = "horiz-adv-x";
466
    final static String SVG_HORIZ_ADV_X_ATTRIBUTE = "horiz-adv-x";
467
    String SVG_HORIZ_ORIGIN_X_ATTRIBUTE = "horiz-origin-x";
467
    final static String SVG_HORIZ_ORIGIN_X_ATTRIBUTE = "horiz-origin-x";
468
    String SVG_HORIZ_ORIGIN_Y_ATTRIBUTE = "horiz-origin-y";
468
    final static String SVG_HORIZ_ORIGIN_Y_ATTRIBUTE = "horiz-origin-y";
469
    String SVG_HREF_ATTRIBUTE = "href";
469
    final static String SVG_HREF_ATTRIBUTE = "href";
470
    String SVG_ID_ATTRIBUTE = "id";
470
    final static String SVG_ID_ATTRIBUTE = "id";
471
    String SVG_IDEOGRAPHIC_ATTRIBUTE = "ideographic";
471
    final static String SVG_IDEOGRAPHIC_ATTRIBUTE = "ideographic";
472
    String SVG_IMAGE_RENDERING_ATTRIBUTE = CSS_IMAGE_RENDERING_PROPERTY;
472
    final static String SVG_IMAGE_RENDERING_ATTRIBUTE = CSS_IMAGE_RENDERING_PROPERTY;
473
    String SVG_IN2_ATTRIBUTE = "in2";
473
    final static String SVG_IN2_ATTRIBUTE = "in2";
474
    String SVG_INTERCEPT_ATTRIBUTE = "intercept";
474
    final static String SVG_INTERCEPT_ATTRIBUTE = "intercept";
475
    String SVG_IN_ATTRIBUTE = "in";
475
    final static String SVG_IN_ATTRIBUTE = "in";
476
    String SVG_K_ATTRIBUTE = "k";
476
    final static String SVG_K_ATTRIBUTE = "k";
477
    String SVG_K1_ATTRIBUTE = "k1";
477
    final static String SVG_K1_ATTRIBUTE = "k1";
478
    String SVG_K2_ATTRIBUTE = "k2";
478
    final static String SVG_K2_ATTRIBUTE = "k2";
479
    String SVG_K3_ATTRIBUTE = "k3";
479
    final static String SVG_K3_ATTRIBUTE = "k3";
480
    String SVG_K4_ATTRIBUTE = "k4";
480
    final static String SVG_K4_ATTRIBUTE = "k4";
481
    String SVG_KERNEL_MATRIX_ATTRIBUTE = "kernelMatrix";
481
    final static String SVG_KERNEL_MATRIX_ATTRIBUTE = "kernelMatrix";
482
    String SVG_KERNEL_UNIT_LENGTH_ATTRIBUTE = "kernelUnitLength";
482
    final static String SVG_KERNEL_UNIT_LENGTH_ATTRIBUTE = "kernelUnitLength";
483
    String SVG_KERNEL_UNIT_LENGTH_X_ATTRIBUTE = "kernelUnitLengthX";
483
    final static String SVG_KERNEL_UNIT_LENGTH_X_ATTRIBUTE = "kernelUnitLengthX";
484
    String SVG_KERNEL_UNIT_LENGTH_Y_ATTRIBUTE = "kernelUnitLengthY";
484
    final static String SVG_KERNEL_UNIT_LENGTH_Y_ATTRIBUTE = "kernelUnitLengthY";
485
    String SVG_KERNING_ATTRIBUTE = CSS_KERNING_PROPERTY;
485
    final static String SVG_KERNING_ATTRIBUTE = CSS_KERNING_PROPERTY;
486
    String SVG_LANG_ATTRIBUTE = "lang";
486
    final static String SVG_LANG_ATTRIBUTE = "lang";
487
    String SVG_LENGTH_ADJUST_ATTRIBUTE = "lengthAdjust";
487
    final static String SVG_LENGTH_ADJUST_ATTRIBUTE = "lengthAdjust";
488
    String SVG_LIGHT_COLOR_ATTRIBUTE = "lightColor";
488
    final static String SVG_LIGHT_COLOR_ATTRIBUTE = "lightColor";
489
    String SVG_LIMITING_CONE_ANGLE_ATTRIBUTE = "limitingConeAngle";
489
    final static String SVG_LIMITING_CONE_ANGLE_ATTRIBUTE = "limitingConeAngle";
490
    String SVG_LOCAL_ATTRIBUTE = "local";
490
    final static String SVG_LOCAL_ATTRIBUTE = "local";
491
    String SVG_MARKER_HEIGHT_ATTRIBUTE = "markerHeight";
491
    final static String SVG_MARKER_HEIGHT_ATTRIBUTE = "markerHeight";
492
    String SVG_MARKER_UNITS_ATTRIBUTE = "markerUnits";
492
    final static String SVG_MARKER_UNITS_ATTRIBUTE = "markerUnits";
493
    String SVG_MARKER_WIDTH_ATTRIBUTE = "markerWidth";
493
    final static String SVG_MARKER_WIDTH_ATTRIBUTE = "markerWidth";
494
    String SVG_MASK_ATTRIBUTE = CSS_MASK_PROPERTY;
494
    final static String SVG_MASK_ATTRIBUTE = CSS_MASK_PROPERTY;
495
    String SVG_MASK_CONTENT_UNITS_ATTRIBUTE = "maskContentUnits";
495
    final static String SVG_MASK_CONTENT_UNITS_ATTRIBUTE = "maskContentUnits";
496
    String SVG_MASK_UNITS_ATTRIBUTE = "maskUnits";
496
    final static String SVG_MASK_UNITS_ATTRIBUTE = "maskUnits";
497
    String SVG_MATHEMATICAL_ATTRIBUTE = "mathematical";
497
    final static String SVG_MATHEMATICAL_ATTRIBUTE = "mathematical";
498
    String SVG_MEDIA_ATTRIBUTE = "media";
498
    final static String SVG_MEDIA_ATTRIBUTE = "media";
499
    String SVG_METHOD_ATTRIBUTE = "method";
499
    final static String SVG_METHOD_ATTRIBUTE = "method";
500
    String SVG_MODE_ATTRIBUTE = "mode";
500
    final static String SVG_MODE_ATTRIBUTE = "mode";
501
    String SVG_NAME_ATTRIBUTE = "name";
501
    final static String SVG_NAME_ATTRIBUTE = "name";
502
    String SVG_NUM_OCTAVES_ATTRIBUTE = "numOctaves";
502
    final static String SVG_NUM_OCTAVES_ATTRIBUTE = "numOctaves";
503
    String SVG_OFFSET_ATTRIBUTE = "offset";
503
    final static String SVG_OFFSET_ATTRIBUTE = "offset";
504
    String SVG_OPACITY_ATTRIBUTE = CSS_OPACITY_PROPERTY;
504
    final static String SVG_OPACITY_ATTRIBUTE = CSS_OPACITY_PROPERTY;
505
    String SVG_OPERATOR_ATTRIBUTE = "operator";
505
    final static String SVG_OPERATOR_ATTRIBUTE = "operator";
506
    String SVG_ORDER_ATTRIBUTE = "order";
506
    final static String SVG_ORDER_ATTRIBUTE = "order";
507
    String SVG_ORDER_X_ATTRIBUTE = "orderX";
507
    final static String SVG_ORDER_X_ATTRIBUTE = "orderX";
508
    String SVG_ORDER_Y_ATTRIBUTE = "orderY";
508
    final static String SVG_ORDER_Y_ATTRIBUTE = "orderY";
509
    String SVG_ORIENT_ATTRIBUTE = "orient";
509
    final static String SVG_ORIENT_ATTRIBUTE = "orient";
510
    String SVG_ORIENTATION_ATTRIBUTE = "orientation";
510
    final static String SVG_ORIENTATION_ATTRIBUTE = "orientation";
511
    String SVG_OVERLINE_POSITION_ATTRIBUTE = "overline-position";
511
    final static String SVG_OVERLINE_POSITION_ATTRIBUTE = "overline-position";
512
    String SVG_OVERLINE_THICKNESS_ATTRIBUTE = "overline-thickness";
512
    final static String SVG_OVERLINE_THICKNESS_ATTRIBUTE = "overline-thickness";
513
    String SVG_PANOSE_1_ATTRIBUTE = "panose-1";
513
    final static String SVG_PANOSE_1_ATTRIBUTE = "panose-1";
514
    String SVG_PATTERN_CONTENT_UNITS_ATTRIBUTE = "patternContentUnits";
514
    final static String SVG_PATTERN_CONTENT_UNITS_ATTRIBUTE = "patternContentUnits";
515
    String SVG_PATTERN_TRANSFORM_ATTRIBUTE = "patternTransform";
515
    final static String SVG_PATTERN_TRANSFORM_ATTRIBUTE = "patternTransform";
516
    String SVG_PATTERN_UNITS_ATTRIBUTE = "patternUnits";
516
    final static String SVG_PATTERN_UNITS_ATTRIBUTE = "patternUnits";
517
    String SVG_POINTS_ATTRIBUTE = "points";
517
    final static String SVG_POINTS_ATTRIBUTE = "points";
518
    String SVG_POINTS_AT_X_ATTRIBUTE = "pointsAtX";
518
    final static String SVG_POINTS_AT_X_ATTRIBUTE = "pointsAtX";
519
    String SVG_POINTS_AT_Y_ATTRIBUTE = "pointsAtY";
519
    final static String SVG_POINTS_AT_Y_ATTRIBUTE = "pointsAtY";
520
    String SVG_POINTS_AT_Z_ATTRIBUTE = "pointsAtZ";
520
    final static String SVG_POINTS_AT_Z_ATTRIBUTE = "pointsAtZ";
521
    String SVG_PRESERVE_ALPHA_ATTRIBUTE = "preserveAlpha";
521
    final static String SVG_PRESERVE_ALPHA_ATTRIBUTE = "preserveAlpha";
522
    String SVG_PRESERVE_ASPECT_RATIO_ATTRIBUTE = "preserveAspectRatio";
522
    final static String SVG_PRESERVE_ASPECT_RATIO_ATTRIBUTE = "preserveAspectRatio";
523
    String SVG_PRIMITIVE_UNITS_ATTRIBUTE = "primitiveUnits";
523
    final static String SVG_PRIMITIVE_UNITS_ATTRIBUTE = "primitiveUnits";
524
    String SVG_RADIUS_ATTRIBUTE = "radius";
524
    final static String SVG_RADIUS_ATTRIBUTE = "radius";
525
    String SVG_REF_X_ATTRIBUTE = "refX";
525
    final static String SVG_REF_X_ATTRIBUTE = "refX";
526
    String SVG_REF_Y_ATTRIBUTE = "refY";
526
    final static String SVG_REF_Y_ATTRIBUTE = "refY";
527
    String SVG_RENDERING_INTENT_ATTRIBUTE = "rendering-intent";
527
    final static String SVG_RENDERING_INTENT_ATTRIBUTE = "rendering-intent";
528
    String SVG_REQUIRED_FEATURES_ATTRIBUTE = "requiredFeatures";
528
    final static String SVG_REQUIRED_FEATURES_ATTRIBUTE = "requiredFeatures";
529
    String SVG_REQUIRED_EXTENSIONS_ATTRIBUTE = "requiredExtensions";
529
    final static String SVG_REQUIRED_EXTENSIONS_ATTRIBUTE = "requiredExtensions";
530
    String SVG_RESULT_ATTRIBUTE = "result";
530
    final static String SVG_RESULT_ATTRIBUTE = "result";
531
    String SVG_RESULT_SCALE_ATTRIBUTE = "resultScale";
531
    final static String SVG_RESULT_SCALE_ATTRIBUTE = "resultScale";
532
    String SVG_RX_ATTRIBUTE = "rx";
532
    final static String SVG_RX_ATTRIBUTE = "rx";
533
    String SVG_RY_ATTRIBUTE = "ry";
533
    final static String SVG_RY_ATTRIBUTE = "ry";
534
    String SVG_R_ATTRIBUTE = "r";
534
    final static String SVG_R_ATTRIBUTE = "r";
535
    String SVG_ROTATE_ATTRIBUTE = "rotate";
535
    final static String SVG_ROTATE_ATTRIBUTE = "rotate";
536
    String SVG_SCALE_ATTRIBUTE = "scale";
536
    final static String SVG_SCALE_ATTRIBUTE = "scale";
537
    String SVG_SEED_ATTRIBUTE = "seed";
537
    final static String SVG_SEED_ATTRIBUTE = "seed";
538
    String SVG_SHAPE_RENDERING_ATTRIBUTE = CSS_SHAPE_RENDERING_PROPERTY;
538
    final static String SVG_SHAPE_RENDERING_ATTRIBUTE = CSS_SHAPE_RENDERING_PROPERTY;
539
    String SVG_SLOPE_ATTRIBUTE = "slope";
539
    final static String SVG_SLOPE_ATTRIBUTE = "slope";
540
    String SVG_SPACE_ATTRIBUTE = "space";
540
    final static String SVG_SPACE_ATTRIBUTE = "space";
541
    String SVG_SPACING_ATTRIBUTE = "spacing";
541
    final static String SVG_SPACING_ATTRIBUTE = "spacing";
542
    String SVG_SPECULAR_CONSTANT_ATTRIBUTE = "specularConstant";
542
    final static String SVG_SPECULAR_CONSTANT_ATTRIBUTE = "specularConstant";
543
    String SVG_SPECULAR_EXPONENT_ATTRIBUTE = "specularExponent";
543
    final static String SVG_SPECULAR_EXPONENT_ATTRIBUTE = "specularExponent";
544
    String SVG_SPREAD_METHOD_ATTRIBUTE = "spreadMethod";
544
    final static String SVG_SPREAD_METHOD_ATTRIBUTE = "spreadMethod";
545
    String SVG_START_OFFSET_ATTRIBUTE = "startOffset";
545
    final static String SVG_START_OFFSET_ATTRIBUTE = "startOffset";
546
    String SVG_STD_DEVIATION_ATTRIBUTE = "stdDeviation";
546
    final static String SVG_STD_DEVIATION_ATTRIBUTE = "stdDeviation";
547
    String SVG_STEMH_ATTRIBUTE = "stemh";
547
    final static String SVG_STEMH_ATTRIBUTE = "stemh";
548
    String SVG_STEMV_ATTRIBUTE = "stemv";
548
    final static String SVG_STEMV_ATTRIBUTE = "stemv";
549
    String SVG_STITCH_TILES_ATTRIBUTE = "stitchTiles";
549
    final static String SVG_STITCH_TILES_ATTRIBUTE = "stitchTiles";
550
    String SVG_STOP_COLOR_ATTRIBUTE = "stop-color";
550
    final static String SVG_STOP_COLOR_ATTRIBUTE = "stop-color";
551
    String SVG_STOP_OPACITY_ATTRIBUTE = CSS_STOP_OPACITY_PROPERTY;
551
    final static String SVG_STOP_OPACITY_ATTRIBUTE = CSS_STOP_OPACITY_PROPERTY;
552
    String SVG_STRIKETHROUGH_POSITION_ATTRIBUTE = "strikethrough-position";
552
    final static String SVG_STRIKETHROUGH_POSITION_ATTRIBUTE = "strikethrough-position";
553
    String SVG_STRIKETHROUGH_THICKNESS_ATTRIBUTE = "strikethrough-thickness";
553
    final static String SVG_STRIKETHROUGH_THICKNESS_ATTRIBUTE = "strikethrough-thickness";
554
    String SVG_STROKE_ATTRIBUTE = CSS_STROKE_PROPERTY;
554
    final static String SVG_STROKE_ATTRIBUTE = CSS_STROKE_PROPERTY;
555
    String SVG_STROKE_DASHARRAY_ATTRIBUTE = CSS_STROKE_DASHARRAY_PROPERTY;
555
    final static String SVG_STROKE_DASHARRAY_ATTRIBUTE = CSS_STROKE_DASHARRAY_PROPERTY;
556
    String SVG_STROKE_DASHOFFSET_ATTRIBUTE = CSS_STROKE_DASHOFFSET_PROPERTY;
556
    final static String SVG_STROKE_DASHOFFSET_ATTRIBUTE = CSS_STROKE_DASHOFFSET_PROPERTY;
557
    String SVG_STROKE_LINECAP_ATTRIBUTE = CSS_STROKE_LINECAP_PROPERTY;
557
    final static String SVG_STROKE_LINECAP_ATTRIBUTE = CSS_STROKE_LINECAP_PROPERTY;
558
    String SVG_STROKE_LINEJOIN_ATTRIBUTE = CSS_STROKE_LINEJOIN_PROPERTY;
558
    final static String SVG_STROKE_LINEJOIN_ATTRIBUTE = CSS_STROKE_LINEJOIN_PROPERTY;
559
    String SVG_STROKE_MITERLIMIT_ATTRIBUTE = CSS_STROKE_MITERLIMIT_PROPERTY;
559
    final static String SVG_STROKE_MITERLIMIT_ATTRIBUTE = CSS_STROKE_MITERLIMIT_PROPERTY;
560
    String SVG_STROKE_OPACITY_ATTRIBUTE = CSS_STROKE_OPACITY_PROPERTY;
560
    final static String SVG_STROKE_OPACITY_ATTRIBUTE = CSS_STROKE_OPACITY_PROPERTY;
561
    String SVG_STROKE_WIDTH_ATTRIBUTE = CSS_STROKE_WIDTH_PROPERTY;
561
    final static String SVG_STROKE_WIDTH_ATTRIBUTE = CSS_STROKE_WIDTH_PROPERTY;
562
    String SVG_STYLE_ATTRIBUTE = "style";
562
    final static String SVG_STYLE_ATTRIBUTE = "style";
563
    String SVG_SURFACE_SCALE_ATTRIBUTE = "surfaceScale";
563
    final static String SVG_SURFACE_SCALE_ATTRIBUTE = "surfaceScale";
564
    String SVG_SYSTEM_LANGUAGE_ATTRIBUTE = "systemLanguage";
564
    final static String SVG_SYSTEM_LANGUAGE_ATTRIBUTE = "systemLanguage";
565
    String SVG_TABLE_ATTRIBUTE = "table";
565
    final static String SVG_TABLE_ATTRIBUTE = "table";
566
    String SVG_TABLE_VALUES_ATTRIBUTE = "tableValues";
566
    final static String SVG_TABLE_VALUES_ATTRIBUTE = "tableValues";
567
    String SVG_TARGET_ATTRIBUTE = "target";
567
    final static String SVG_TARGET_ATTRIBUTE = "target";
568
    String SVG_TARGET_X_ATTRIBUTE = "targetX";
568
    final static String SVG_TARGET_X_ATTRIBUTE = "targetX";
569
    String SVG_TARGET_Y_ATTRIBUTE = "targetY";
569
    final static String SVG_TARGET_Y_ATTRIBUTE = "targetY";
570
    String SVG_TEXT_ANCHOR_ATTRIBUTE = CSS_TEXT_ANCHOR_PROPERTY;
570
    final static String SVG_TEXT_ANCHOR_ATTRIBUTE = CSS_TEXT_ANCHOR_PROPERTY;
571
    String SVG_TEXT_LENGTH_ATTRIBUTE = "textLength";
571
    final static String SVG_TEXT_LENGTH_ATTRIBUTE = "textLength";
572
    String SVG_TEXT_RENDERING_ATTRIBUTE = CSS_TEXT_RENDERING_PROPERTY;
572
    final static String SVG_TEXT_RENDERING_ATTRIBUTE = CSS_TEXT_RENDERING_PROPERTY;
573
    String SVG_TITLE_ATTRIBUTE = "title";
573
    final static String SVG_TITLE_ATTRIBUTE = "title";
574
    String SVG_TRANSFORM_ATTRIBUTE = "transform";
574
    final static String SVG_TRANSFORM_ATTRIBUTE = "transform";
575
    String SVG_TYPE_ATTRIBUTE = "type";
575
    final static String SVG_TYPE_ATTRIBUTE = "type";
576
    String SVG_U1_ATTRIBUTE = "u1";
576
    final static String SVG_U1_ATTRIBUTE = "u1";
577
    String SVG_U2_ATTRIBUTE = "u2";
577
    final static String SVG_U2_ATTRIBUTE = "u2";
578
    String SVG_UNDERLINE_POSITION_ATTRIBUTE = "underline-position";
578
    final static String SVG_UNDERLINE_POSITION_ATTRIBUTE = "underline-position";
579
    String SVG_UNDERLINE_THICKNESS_ATTRIBUTE = "underline-thickness";
579
    final static String SVG_UNDERLINE_THICKNESS_ATTRIBUTE = "underline-thickness";
580
    String SVG_UNICODE_ATTRIBUTE = "unicode";
580
    final static String SVG_UNICODE_ATTRIBUTE = "unicode";
581
    String SVG_UNICODE_RANGE_ATTRIBUTE = "unicode-range";
581
    final static String SVG_UNICODE_RANGE_ATTRIBUTE = "unicode-range";
582
    String SVG_UNITS_PER_EM_ATTRIBUTE = "units-per-em";
582
    final static String SVG_UNITS_PER_EM_ATTRIBUTE = "units-per-em";
583
    String SVG_V_ALPHABETIC_ATTRIBUTE = "v-alphabetic";
583
    final static String SVG_V_ALPHABETIC_ATTRIBUTE = "v-alphabetic";
584
    String SVG_V_HANGING_ATTRIBUTE = "v-hanging";
584
    final static String SVG_V_HANGING_ATTRIBUTE = "v-hanging";
585
    String SVG_V_IDEOGRAPHIC_ATTRIBUTE = "v-ideographic";
585
    final static String SVG_V_IDEOGRAPHIC_ATTRIBUTE = "v-ideographic";
586
    String SVG_V_MATHEMATICAL_ATTRIBUTE = "v-mathematical";
586
    final static String SVG_V_MATHEMATICAL_ATTRIBUTE = "v-mathematical";
587
    String SVG_VALUES_ATTRIBUTE = "values";
587
    final static String SVG_VALUES_ATTRIBUTE = "values";
588
    String SVG_VERSION_ATTRIBUTE = "version";
588
    final static String SVG_VERSION_ATTRIBUTE = "version";
589
    String SVG_VERT_ADV_Y_ATTRIBUTE = "vert-adv-y";
589
    final static String SVG_VERT_ADV_Y_ATTRIBUTE = "vert-adv-y";
590
    String SVG_VERT_ORIGIN_X_ATTRIBUTE = "vert-origin-x";
590
    final static String SVG_VERT_ORIGIN_X_ATTRIBUTE = "vert-origin-x";
591
    String SVG_VERT_ORIGIN_Y_ATTRIBUTE = "vert-origin-y";
591
    final static String SVG_VERT_ORIGIN_Y_ATTRIBUTE = "vert-origin-y";
592
    String SVG_VIEW_BOX_ATTRIBUTE = "viewBox";
592
    final static String SVG_VIEW_BOX_ATTRIBUTE = "viewBox";
593
    String SVG_WIDTH_ATTRIBUTE = "width";
593
    final static String SVG_WIDTH_ATTRIBUTE = "width";
594
    String SVG_WIDTHS_ATTRIBUTE = "widths";
594
    final static String SVG_WIDTHS_ATTRIBUTE = "widths";
595
    String SVG_X1_ATTRIBUTE = "x1";
595
    final static String SVG_X1_ATTRIBUTE = "x1";
596
    String SVG_X2_ATTRIBUTE = "x2";
596
    final static String SVG_X2_ATTRIBUTE = "x2";
597
    String SVG_X_ATTRIBUTE = "x";
597
    final static String SVG_X_ATTRIBUTE = "x";
598
    String SVG_X_CHANNEL_SELECTOR_ATTRIBUTE = "xChannelSelector";
598
    final static String SVG_X_CHANNEL_SELECTOR_ATTRIBUTE = "xChannelSelector";
599
    String SVG_X_HEIGHT_ATTRIBUTE = "xHeight";
599
    final static String SVG_X_HEIGHT_ATTRIBUTE = "xHeight";
600
    String SVG_Y1_ATTRIBUTE = "y1";
600
    final static String SVG_Y1_ATTRIBUTE = "y1";
601
    String SVG_Y2_ATTRIBUTE = "y2";
601
    final static String SVG_Y2_ATTRIBUTE = "y2";
602
    String SVG_Y_ATTRIBUTE = "y";
602
    final static String SVG_Y_ATTRIBUTE = "y";
603
    String SVG_Y_CHANNEL_SELECTOR_ATTRIBUTE = "yChannelSelector";
603
    final static String SVG_Y_CHANNEL_SELECTOR_ATTRIBUTE = "yChannelSelector";
604
    String SVG_Z_ATTRIBUTE = "z";
604
    final static String SVG_Z_ATTRIBUTE = "z";
605
    String SVG_ZOOM_AND_PAN_ATTRIBUTE = "zoomAndPan";
605
    final static String SVG_ZOOM_AND_PAN_ATTRIBUTE = "zoomAndPan";
606
606
607
    /////////////////////////////////////////////////////////////////////////
607
    /////////////////////////////////////////////////////////////////////////
608
    // SVG attribute value
608
    // SVG attribute value
609
    /////////////////////////////////////////////////////////////////////////
609
    /////////////////////////////////////////////////////////////////////////
610
610
611
    String SVG_100_VALUE = "100";
611
    final static String SVG_100_VALUE = "100";
612
    String SVG_200_VALUE = "200";
612
    final static String SVG_200_VALUE = "200";
613
    String SVG_300_VALUE = "300";
613
    final static String SVG_300_VALUE = "300";
614
    String SVG_400_VALUE = "400";
614
    final static String SVG_400_VALUE = "400";
615
    String SVG_500_VALUE = "500";
615
    final static String SVG_500_VALUE = "500";
616
    String SVG_600_VALUE = "600";
616
    final static String SVG_600_VALUE = "600";
617
    String SVG_700_VALUE = "700";
617
    final static String SVG_700_VALUE = "700";
618
    String SVG_800_VALUE = "800";
618
    final static String SVG_800_VALUE = "800";
619
    String SVG_900_VALUE = "900";
619
    final static String SVG_900_VALUE = "900";
620
    String SVG_ABSOLUTE_COLORIMETRIC_VALUE = "absolute-colorimetric";
620
    final static String SVG_ABSOLUTE_COLORIMETRIC_VALUE = "absolute-colorimetric";
621
    String SVG_ALIGN_VALUE = "align";
621
    final static String SVG_ALIGN_VALUE = "align";
622
    String SVG_ALL_VALUE = "all";
622
    final static String SVG_ALL_VALUE = "all";
623
    String SVG_ARITHMETIC_VALUE = "arithmetic";
623
    final static String SVG_ARITHMETIC_VALUE = "arithmetic";
624
    String SVG_ATOP_VALUE = "atop";
624
    final static String SVG_ATOP_VALUE = "atop";
625
    String SVG_AUTO_VALUE = "auto";
625
    final static String SVG_AUTO_VALUE = "auto";
626
    String SVG_A_VALUE = "A";
626
    final static String SVG_A_VALUE = "A";
627
    String SVG_BACKGROUND_ALPHA_VALUE = "BackgroundAlpha";
627
    final static String SVG_BACKGROUND_ALPHA_VALUE = "BackgroundAlpha";
628
    String SVG_BACKGROUND_IMAGE_VALUE = "BackgroundImage";
628
    final static String SVG_BACKGROUND_IMAGE_VALUE = "BackgroundImage";
629
    String SVG_BEVEL_VALUE = "bevel";
629
    final static String SVG_BEVEL_VALUE = "bevel";
630
    String SVG_BOLDER_VALUE = "bolder";
630
    final static String SVG_BOLDER_VALUE = "bolder";
631
    String SVG_BOLD_VALUE = "bold";
631
    final static String SVG_BOLD_VALUE = "bold";
632
    String SVG_BUTT_VALUE = "butt";
632
    final static String SVG_BUTT_VALUE = "butt";
633
    String SVG_B_VALUE = "B";
633
    final static String SVG_B_VALUE = "B";
634
    String SVG_COMPOSITE_VALUE = "composite";
634
    final static String SVG_COMPOSITE_VALUE = "composite";
635
    String SVG_CRISP_EDGES_VALUE = "crispEdges";
635
    final static String SVG_CRISP_EDGES_VALUE = "crispEdges";
636
    String SVG_CROSSHAIR_VALUE = "crosshair";
636
    final static String SVG_CROSSHAIR_VALUE = "crosshair";
637
    String SVG_DARKEN_VALUE = "darken";
637
    final static String SVG_DARKEN_VALUE = "darken";
638
    String SVG_DEFAULT_VALUE = "default";
638
    final static String SVG_DEFAULT_VALUE = "default";
639
    String SVG_DIGIT_ONE_VALUE = "1";
639
    final static String SVG_DIGIT_ONE_VALUE = "1";
640
    String SVG_DILATE_VALUE = "dilate";
640
    final static String SVG_DILATE_VALUE = "dilate";
641
    String SVG_DISABLE_VALUE = "disable";
641
    final static String SVG_DISABLE_VALUE = "disable";
642
    String SVG_DISCRETE_VALUE = "discrete";
642
    final static String SVG_DISCRETE_VALUE = "discrete";
643
    String SVG_DUPLICATE_VALUE = "duplicate";
643
    final static String SVG_DUPLICATE_VALUE = "duplicate";
644
    String SVG_END_VALUE = "end";
644
    final static String SVG_END_VALUE = "end";
645
    String SVG_ERODE_VALUE = "erode";
645
    final static String SVG_ERODE_VALUE = "erode";
646
    String SVG_EVEN_ODD_VALUE = "evenodd";
646
    final static String SVG_EVEN_ODD_VALUE = "evenodd";
647
    String SVG_EXACT_VALUE = "exact";
647
    final static String SVG_EXACT_VALUE = "exact";
648
    String SVG_E_RESIZE_VALUE = "e-resize";
648
    final static String SVG_E_RESIZE_VALUE = "e-resize";
649
    String SVG_FALSE_VALUE = "false";
649
    final static String SVG_FALSE_VALUE = "false";
650
    String SVG_FILL_PAINT_VALUE = "FillPaint";
650
    final static String SVG_FILL_PAINT_VALUE = "FillPaint";
651
    String SVG_FLOOD_VALUE = "flood";
651
    final static String SVG_FLOOD_VALUE = "flood";
652
    String SVG_FRACTAL_NOISE_VALUE = "fractalNoise";
652
    final static String SVG_FRACTAL_NOISE_VALUE = "fractalNoise";
653
    String SVG_GAMMA_VALUE = "gamma";
653
    final static String SVG_GAMMA_VALUE = "gamma";
654
    String SVG_GEOMETRIC_PRECISION_VALUE = "geometricPrecision";
654
    final static String SVG_GEOMETRIC_PRECISION_VALUE = "geometricPrecision";
655
    String SVG_G_VALUE = "G";
655
    final static String SVG_G_VALUE = "G";
656
    String SVG_HELP_VALUE = "help";
656
    final static String SVG_HELP_VALUE = "help";
657
    String SVG_HUE_ROTATE_VALUE = "hueRotate";
657
    final static String SVG_HUE_ROTATE_VALUE = "hueRotate";
658
    String SVG_HUNDRED_PERCENT_VALUE = "100%";
658
    final static String SVG_HUNDRED_PERCENT_VALUE = "100%";
659
    String SVG_H_VALUE = "h";
659
    final static String SVG_H_VALUE = "h";
660
    String SVG_IDENTITY_VALUE = "identity";
660
    final static String SVG_IDENTITY_VALUE = "identity";
661
    String SVG_INITIAL_VALUE = "initial";
661
    final static String SVG_INITIAL_VALUE = "initial";
662
    String SVG_IN_VALUE = "in";
662
    final static String SVG_IN_VALUE = "in";
663
    String SVG_ISOLATED_VALUE = "isolated";
663
    final static String SVG_ISOLATED_VALUE = "isolated";
664
    String SVG_ITALIC_VALUE = "italic";
664
    final static String SVG_ITALIC_VALUE = "italic";
665
    String SVG_LIGHTEN_VALUE = "lighten";
665
    final static String SVG_LIGHTEN_VALUE = "lighten";
666
    String SVG_LIGHTER_VALUE = "lighter";
666
    final static String SVG_LIGHTER_VALUE = "lighter";
667
    String SVG_LINEAR_RGB_VALUE = "linearRGB";
667
    final static String SVG_LINEAR_RGB_VALUE = "linearRGB";
668
    String SVG_LINEAR_VALUE = "linear";
668
    final static String SVG_LINEAR_VALUE = "linear";
669
    String SVG_LUMINANCE_TO_ALPHA_VALUE = "luminanceToAlpha";
669
    final static String SVG_LUMINANCE_TO_ALPHA_VALUE = "luminanceToAlpha";
670
    String SVG_MAGNIFY_VALUE = "magnify";
670
    final static String SVG_MAGNIFY_VALUE = "magnify";
671
    String SVG_MATRIX_VALUE = "matrix";
671
    final static String SVG_MATRIX_VALUE = "matrix";
672
    String SVG_MEDIAL_VALUE = "medial";
672
    final static String SVG_MEDIAL_VALUE = "medial";
673
    String SVG_MIDDLE_VALUE = "middle";
673
    final static String SVG_MIDDLE_VALUE = "middle";
674
    String SVG_MITER_VALUE = "miter";
674
    final static String SVG_MITER_VALUE = "miter";
675
    String SVG_MOVE_VALUE = "move";
675
    final static String SVG_MOVE_VALUE = "move";
676
    String SVG_MULTIPLY_VALUE = "multiply";
676
    final static String SVG_MULTIPLY_VALUE = "multiply";
677
    String SVG_NEW_VALUE = "new";
677
    final static String SVG_NEW_VALUE = "new";
678
    String SVG_NE_RESIZE_VALUE = "ne-resize";
678
    final static String SVG_NE_RESIZE_VALUE = "ne-resize";
679
    String SVG_NINETY_VALUE = "90";
679
    final static String SVG_NINETY_VALUE = "90";
680
    String SVG_NONE_VALUE = "none";
680
    final static String SVG_NONE_VALUE = "none";
681
    String SVG_NON_ZERO_VALUE = "nonzero";
681
    final static String SVG_NON_ZERO_VALUE = "nonzero";
682
    String SVG_NORMAL_VALUE = "normal";
682
    final static String SVG_NORMAL_VALUE = "normal";
683
    String SVG_NO_STITCH_VALUE = "noStitch";
683
    final static String SVG_NO_STITCH_VALUE = "noStitch";
684
    String SVG_NW_RESIZE_VALUE = "nw-resize";
684
    final static String SVG_NW_RESIZE_VALUE = "nw-resize";
685
    String SVG_N_RESIZE_VALUE = "n-resize";
685
    final static String SVG_N_RESIZE_VALUE = "n-resize";
686
    String SVG_OBJECT_BOUNDING_BOX_VALUE = "objectBoundingBox";
686
    final static String SVG_OBJECT_BOUNDING_BOX_VALUE = "objectBoundingBox";
687
    String SVG_OBLIQUE_VALUE = "oblique";
687
    final static String SVG_OBLIQUE_VALUE = "oblique";
688
    String SVG_ONE_VALUE = "1";
688
    final static String SVG_ONE_VALUE = "1";
689
    String SVG_OPAQUE_VALUE = "1";
689
    final static String SVG_OPAQUE_VALUE = "1";
690
    String SVG_OPTIMIZE_LEGIBILITY_VALUE = "optimizeLegibility";
690
    final static String SVG_OPTIMIZE_LEGIBILITY_VALUE = "optimizeLegibility";
691
    String SVG_OPTIMIZE_QUALITY_VALUE = "optimizeQuality";
691
    final static String SVG_OPTIMIZE_QUALITY_VALUE = "optimizeQuality";
692
    String SVG_OPTIMIZE_SPEED_VALUE = "optimizeSpeed";
692
    final static String SVG_OPTIMIZE_SPEED_VALUE = "optimizeSpeed";
693
    String SVG_OUT_VALUE = "out";
693
    final static String SVG_OUT_VALUE = "out";
694
    String SVG_OVER_VALUE = "over";
694
    final static String SVG_OVER_VALUE = "over";
695
    String SVG_PACED_VALUE = "paced";
695
    final static String SVG_PACED_VALUE = "paced";
696
    String SVG_PAD_VALUE = "pad";
696
    final static String SVG_PAD_VALUE = "pad";
697
    String SVG_PERCEPTUAL_VALUE = "perceptual";
697
    final static String SVG_PERCEPTUAL_VALUE = "perceptual";
698
    String SVG_POINTER_VALUE = "pointer";
698
    final static String SVG_POINTER_VALUE = "pointer";
699
    String SVG_PRESERVE_VALUE = "preserve";
699
    final static String SVG_PRESERVE_VALUE = "preserve";
700
    String SVG_REFLECT_VALUE = "reflect";
700
    final static String SVG_REFLECT_VALUE = "reflect";
701
    String SVG_RELATIVE_COLORIMETRIC_VALUE = "relative-colorimetric";
701
    final static String SVG_RELATIVE_COLORIMETRIC_VALUE = "relative-colorimetric";
702
    String SVG_REPEAT_VALUE = "repeat";
702
    final static String SVG_REPEAT_VALUE = "repeat";
703
    String SVG_ROUND_VALUE = "round";
703
    final static String SVG_ROUND_VALUE = "round";
704
    String SVG_R_VALUE = "R";
704
    final static String SVG_R_VALUE = "R";
705
    String SVG_SATURATE_VALUE = "saturate";
705
    final static String SVG_SATURATE_VALUE = "saturate";
706
    String SVG_SATURATION_VALUE = "saturation";
706
    final static String SVG_SATURATION_VALUE = "saturation";
707
    String SVG_SCREEN_VALUE = "screen";
707
    final static String SVG_SCREEN_VALUE = "screen";
708
    String SVG_SE_RESIZE_VALUE = "se-resize";
708
    final static String SVG_SE_RESIZE_VALUE = "se-resize";
709
    String SVG_SOURCE_ALPHA_VALUE = "SourceAlpha";
709
    final static String SVG_SOURCE_ALPHA_VALUE = "SourceAlpha";
710
    String SVG_SOURCE_GRAPHIC_VALUE = "SourceGraphic";
710
    final static String SVG_SOURCE_GRAPHIC_VALUE = "SourceGraphic";
711
    String SVG_SPACING_AND_GLYPHS_VALUE = "spacingAndGlyphs";
711
    final static String SVG_SPACING_AND_GLYPHS_VALUE = "spacingAndGlyphs";
712
    String SVG_SPACING_VALUE = "spacing";
712
    final static String SVG_SPACING_VALUE = "spacing";
713
    String SVG_SQUARE_VALUE = "square";
713
    final static String SVG_SQUARE_VALUE = "square";
714
    String SVG_SRGB_VALUE = "sRGB";
714
    final static String SVG_SRGB_VALUE = "sRGB";
715
    String SVG_START_VALUE = "start";
715
    final static String SVG_START_VALUE = "start";
716
    String SVG_STITCH_VALUE = "stitch";
716
    final static String SVG_STITCH_VALUE = "stitch";
717
    String SVG_STRETCH_VALUE = "stretch";
717
    final static String SVG_STRETCH_VALUE = "stretch";
718
    String SVG_STROKE_PAINT_VALUE = "StrokePaint";
718
    final static String SVG_STROKE_PAINT_VALUE = "StrokePaint";
719
    String SVG_STROKE_WIDTH_VALUE = "strokeWidth";
719
    final static String SVG_STROKE_WIDTH_VALUE = "strokeWidth";
720
    String SVG_SW_RESIZE_VALUE = "sw-resize";
720
    final static String SVG_SW_RESIZE_VALUE = "sw-resize";
721
    String SVG_S_RESIZE_VALUE = "s-resize";
721
    final static String SVG_S_RESIZE_VALUE = "s-resize";
722
    String SVG_TABLE_VALUE = "table";
722
    final static String SVG_TABLE_VALUE = "table";
723
    String SVG_TERMINAL_VALUE = "terminal";
723
    final static String SVG_TERMINAL_VALUE = "terminal";
724
    String SVG_TEXT_VALUE = "text";
724
    final static String SVG_TEXT_VALUE = "text";
725
    String SVG_TRANSLATE_VALUE = "translate";
725
    final static String SVG_TRANSLATE_VALUE = "translate";
726
    String SVG_TRUE_VALUE = "true";
726
    final static String SVG_TRUE_VALUE = "true";
727
    String SVG_TURBULENCE_VALUE = "turbulence";
727
    final static String SVG_TURBULENCE_VALUE = "turbulence";
728
    String SVG_USER_SPACE_ON_USE_VALUE = "userSpaceOnUse";
728
    final static String SVG_USER_SPACE_ON_USE_VALUE = "userSpaceOnUse";
729
    String SVG_V_VALUE = "v";
729
    final static String SVG_V_VALUE = "v";
730
    String SVG_WAIT_VALUE = "wait";
730
    final static String SVG_WAIT_VALUE = "wait";
731
    String SVG_WRAP_VALUE = "wrap";
731
    final static String SVG_WRAP_VALUE = "wrap";
732
    String SVG_W_RESIZE_VALUE = "w-resize";
732
    final static String SVG_W_RESIZE_VALUE = "w-resize";
733
    String SVG_XOR_VALUE = "xor";
733
    final static String SVG_XOR_VALUE = "xor";
734
    String SVG_ZERO_PERCENT_VALUE = "0%";
734
    final static String SVG_ZERO_PERCENT_VALUE = "0%";
735
    String SVG_ZERO_VALUE = "0";
735
    final static String SVG_ZERO_VALUE = "0";
736
736
737
737
738
    ///////////////////////////////////////////////////////////////////
738
    ///////////////////////////////////////////////////////////////////
739
    // default values for attributes
739
    // default values for attributes
740
    ///////////////////////////////////////////////////////////////////
740
    ///////////////////////////////////////////////////////////////////
741
741
742
    String SVG_CIRCLE_CX_DEFAULT_VALUE = "0";
742
    final static String SVG_CIRCLE_CX_DEFAULT_VALUE = "0";
743
    String SVG_CIRCLE_CY_DEFAULT_VALUE = "0";
743
    final static String SVG_CIRCLE_CY_DEFAULT_VALUE = "0";
744
    String SVG_CLIP_PATH_CLIP_PATH_UNITS_DEFAULT_VALUE = SVG_USER_SPACE_ON_USE_VALUE;
744
    final static String SVG_CLIP_PATH_CLIP_PATH_UNITS_DEFAULT_VALUE = SVG_USER_SPACE_ON_USE_VALUE;
745
    String SVG_COMPONENT_TRANSFER_FUNCTION_AMPLITUDE_DEFAULT_VALUE = "1";
745
    final static String SVG_COMPONENT_TRANSFER_FUNCTION_AMPLITUDE_DEFAULT_VALUE = "1";
746
    String SVG_COMPONENT_TRANSFER_FUNCTION_EXPONENT_DEFAULT_VALUE = "1";
746
    final static String SVG_COMPONENT_TRANSFER_FUNCTION_EXPONENT_DEFAULT_VALUE = "1";
747
    String SVG_COMPONENT_TRANSFER_FUNCTION_INTERCEPT_DEFAULT_VALUE = "0";
747
    final static String SVG_COMPONENT_TRANSFER_FUNCTION_INTERCEPT_DEFAULT_VALUE = "0";
748
    String SVG_COMPONENT_TRANSFER_FUNCTION_OFFSET_DEFAULT_VALUE = "0";
748
    final static String SVG_COMPONENT_TRANSFER_FUNCTION_OFFSET_DEFAULT_VALUE = "0";
749
    String SVG_COMPONENT_TRANSFER_FUNCTION_SLOPE_DEFAULT_VALUE = "1";
749
    final static String SVG_COMPONENT_TRANSFER_FUNCTION_SLOPE_DEFAULT_VALUE = "1";
750
    String SVG_COMPONENT_TRANSFER_FUNCTION_TABLE_VALUES_DEFAULT_VALUE = "";
750
    final static String SVG_COMPONENT_TRANSFER_FUNCTION_TABLE_VALUES_DEFAULT_VALUE = "";
751
    String SVG_CURSOR_X_DEFAULT_VALUE = "0";
751
    final static String SVG_CURSOR_X_DEFAULT_VALUE = "0";
752
    String SVG_CURSOR_Y_DEFAULT_VALUE = "0";
752
    final static String SVG_CURSOR_Y_DEFAULT_VALUE = "0";
753
    String SVG_ELLIPSE_CX_DEFAULT_VALUE = "0";
753
    final static String SVG_ELLIPSE_CX_DEFAULT_VALUE = "0";
754
    String SVG_ELLIPSE_CY_DEFAULT_VALUE = "0";
754
    final static String SVG_ELLIPSE_CY_DEFAULT_VALUE = "0";
755
    String SVG_FE_COMPOSITE_K1_DEFAULT_VALUE = "0";
755
    final static String SVG_FE_COMPOSITE_K1_DEFAULT_VALUE = "0";
756
    String SVG_FE_COMPOSITE_K2_DEFAULT_VALUE = "0";
756
    final static String SVG_FE_COMPOSITE_K2_DEFAULT_VALUE = "0";
757
    String SVG_FE_COMPOSITE_K3_DEFAULT_VALUE = "0";
757
    final static String SVG_FE_COMPOSITE_K3_DEFAULT_VALUE = "0";
758
    String SVG_FE_COMPOSITE_K4_DEFAULT_VALUE = "0";
758
    final static String SVG_FE_COMPOSITE_K4_DEFAULT_VALUE = "0";
759
    String SVG_FE_COMPOSITE_OPERATOR_DEFAULT_VALUE = SVG_OVER_VALUE;
759
    final static String SVG_FE_COMPOSITE_OPERATOR_DEFAULT_VALUE = SVG_OVER_VALUE;
760
    String SVG_FE_CONVOLVE_MATRIX_EDGE_MODE_DEFAULT_VALUE = SVG_DUPLICATE_VALUE;
760
    final static String SVG_FE_CONVOLVE_MATRIX_EDGE_MODE_DEFAULT_VALUE = SVG_DUPLICATE_VALUE;
761
    String SVG_F