Examples of CSSValueList


Examples of org.w3c.dom.css.CSSValueList

        CSSValue v
            = decl.getPropertyCSSValueInternal(CSS_ENABLE_BACKGROUND_PROPERTY);
        if (v.getCssValueType() != v.CSS_VALUE_LIST) {
            return null; // accumulate
        }
        CSSValueList l = (CSSValueList)v;
        int length = l.getLength();
        switch (length) {
        case 1:
            return CompositeGraphicsNode.VIEWPORT; // new
        case 5: // new <x>,<y>,<width>,<height>
            v = l.item(1);
            float x = UnitProcessor.cssHorizontalCoordinateToUserSpace
                (v, CSS_ENABLE_BACKGROUND_PROPERTY, uctx);
            v = l.item(2);
            float y = UnitProcessor.cssVerticalCoordinateToUserSpace
                (v, CSS_ENABLE_BACKGROUND_PROPERTY, uctx);
            v = l.item(3);
            float w = UnitProcessor.cssHorizontalLengthToUserSpace
                (v, CSS_ENABLE_BACKGROUND_PROPERTY, uctx);
            v = l.item(4);
            float h = UnitProcessor.cssVerticalLengthToUserSpace
                (v, CSS_ENABLE_BACKGROUND_PROPERTY, uctx);
            return new Rectangle2D.Float(x, y, w, h);
        default:
            // If more than zero but less than four of the values
View Full Code Here

Examples of org.w3c.dom.css.CSSValueList

    public static
        float [] convertStrokeDasharray(CSSValue v,
                                        UnitProcessor.Context uctx) {
        float [] dasharray = null;
        if (v.getCssValueType() == CSSValue.CSS_VALUE_LIST) {
            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
TOP
Copyright © 2018 www.massapi.com. 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.