Package org.w3c.dom.svg

Examples of org.w3c.dom.svg.SVGPaint


                                       ctx);
            default:
                throw new Error(); // can't be reached
            }
        } else { // SVGPaint
            SVGPaint p = (SVGPaint)paintDef;
            Paint paint = null;
            switch (p.getPaintType()) {
            case SVGPaint.SVG_PAINTTYPE_NONE:
                return null; // 'none'
            case SVGPaint.SVG_PAINTTYPE_RGBCOLOR:
                return convertColor(p.getRGBColor(), opacity);
/* -- The one which is missing in our current SVG DOM bindings --
            case SVGPaint.SVG_PAINTTYPE_URI:
                return convertURIPaint(paintedElement,
                                       paintedNode,
                                       p,
                                       opacity,
                                       ctx);
*/
            case SVGPaint.SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR:
                return convertRGBICCColor(paintedElement,
                                          (SVGColor)paintDef,
                                          opacity,
                                          ctx);
            case SVGPaint.SVG_PAINTTYPE_URI_NONE:
                return silentConvertURIPaint(paintedElement,
                                             paintedNode,
                                             (SVGPaint)paintDef,
                                             opacity,
                                             ctx);
            case SVGPaint.SVG_PAINTTYPE_URI_CURRENTCOLOR:
                paint = silentConvertURIPaint(paintedElement,
                                              paintedNode,
                                              (SVGPaint)paintDef,
                                              opacity,
                                              ctx);
                if (paint == null) { // no paint found
                    CSSOMReadOnlyStyleDeclaration decl =
                        CSSUtilities.getComputedStyle(paintedElement);
                    CSSValue v
                        = decl.getPropertyCSSValueInternal(CSS_COLOR_PROPERTY);
                    paint =  convertColor
                        (((CSSPrimitiveValue)v).getRGBColorValue(), opacity);
                }
                return paint;
            case SVGPaint.SVG_PAINTTYPE_URI_RGBCOLOR:
                paint = silentConvertURIPaint(paintedElement,
                                              paintedNode,
                                              (SVGPaint)paintDef,
                                              opacity,
                                              ctx);
                if (paint == null) { // no paint found
                    paint = convertColor(p.getRGBColor(), opacity);
                }
                return paint;
            case SVGPaint.SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR:
                paint = silentConvertURIPaint(paintedElement,
                                              paintedNode,
View Full Code Here

TOP

Related Classes of org.w3c.dom.svg.SVGPaint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.