Package org.w3c.dom.css

Examples of org.w3c.dom.css.CSSValue


                                         float opacity,
                                         BridgeContext ctx) {

        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(stopElement);

        CSSValue colorDef
            = decl.getPropertyCSSValueInternal(CSS_STOP_COLOR_PROPERTY);

        float stopOpacity = PaintServer.convertOpacity
            (decl.getPropertyCSSValueInternal(CSS_STOP_OPACITY_PROPERTY));
        opacity *= stopOpacity;

        if (colorDef.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
            CSSPrimitiveValue v = (CSSPrimitiveValue)colorDef;
            return PaintServer.convertColor(v.getRGBColorValue(), opacity);
        } else {
            return PaintServer.convertRGBICCColor
                (stopElement, (SVGColor)colorDef, opacity, ctx);
View Full Code Here


                                              BridgeContext ctx) {

        CSSOMReadOnlyStyleDeclaration decl
            = CSSUtilities.getComputedStyle(paintedElement);

        CSSValue v;

        v = decl.getPropertyCSSValueInternal(CSS_MARKER_START_PROPERTY);
        Marker startMarker
            = convertMarker(paintedElement, (CSSPrimitiveValue)v, ctx);
View Full Code Here

            CSSUtilities.getComputedStyle(strokedElement);
        // 'stroke-opacity'
        float opacity = convertOpacity
            (decl.getPropertyCSSValueInternal(CSS_STROKE_OPACITY_PROPERTY));
        // 'stroke'
        CSSValue paintDef
            = decl.getPropertyCSSValueInternal(CSS_STROKE_PROPERTY);

        return convertPaint(strokedElement,
                            strokedNode,
                            paintDef,
View Full Code Here

            CSSUtilities.getComputedStyle(filledElement);
        // 'fill-opacity'
        float opacity = convertOpacity
            (decl.getPropertyCSSValueInternal(CSS_FILL_OPACITY_PROPERTY));
        // 'fill'
        CSSValue paintDef = decl.getPropertyCSSValueInternal(CSS_FILL_PROPERTY);

        return convertPaint(filledElement,
                            filledNode,
                            paintDef,
                            opacity,
View Full Code Here

                                              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;
View Full Code Here

        // percentages and units are relative to the strokedElement's viewport
        UnitProcessor.Context uctx
            = UnitProcessor.createContext(ctx, strokedElement);
        CSSOMReadOnlyStyleDeclaration decl
            = CSSUtilities.getComputedStyle(strokedElement);
        CSSValue v;

        v = decl.getPropertyCSSValueInternal(CSS_STROKE_WIDTH_PROPERTY);
        float width = UnitProcessor.cssOtherLengthToUserSpace
            (v, CSS_STROKE_WIDTH_PROPERTY, uctx);
View Full Code Here

            CSSValueList l = (CSSValueList)v;
            int length = l.getLength();
            dasharray = new float[length];
            float sum = 0;
            for (int i=0; i < dasharray.length; ++i) {
                CSSValue vv = l.item(i);
                float dash = UnitProcessor.cssOtherLengthToUserSpace
                    (vv, CSS_STROKE_DASHARRAY_PROPERTY, uctx);
                dasharray[i] = dash;
                sum += dash;
            }
View Full Code Here

        } else if (items.length < len) {
            CSSValue[] nitems = new CSSValue[len];
            System.arraycopy( items, 0, nitems, 0, items.length );
            items = nitems;
        }
        CSSValue result = items[index];
        if (result == null) {
            items[index] = result = new ListComponent(index);
        }
        return result;
    }
View Full Code Here

    /**
     * <b>DOM</b>: Implements {@link
     * org.w3c.dom.svg.SVGStylable#getPresentationAttribute(String)}.
     */
    public CSSValue getPresentationAttribute(String name) {
        CSSValue result = (CSSValue)getLiveAttributeValue(null, name);
        if (result != null)
            return result;

        CSSEngine eng = ((SVGOMDocument)getOwnerDocument()).getCSSEngine();
        int idx = eng.getPropertyIndex(name);
View Full Code Here

    /**
     * <b>DOM</b>: Implements {@link
     * org.w3c.dom.css.CSSStyleDeclaration#getPropertyCSSValue(String)}.
     */
    public CSSValue getPropertyCSSValue(String propertyName) {
        CSSValue result = (CSSValue)values.get(propertyName);
        if (result == null) {
            int idx = cssEngine.getPropertyIndex(propertyName);
            if (idx != -1) {
                result = createCSSValue(idx);
                values.put(propertyName, result);
View Full Code Here

TOP

Related Classes of org.w3c.dom.css.CSSValue

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.