Examples of CSSOMReadOnlyStyleDeclaration


Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     * 'hidden'.
     *
     * @param e the element with the 'overflow' property
     */
    public static boolean convertOverflow(Element e) {
        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(e);
        CSSPrimitiveValue overflow =
            (CSSPrimitiveValue)decl.getPropertyCSSValueInternal
            (CSS_OVERFLOW_PROPERTY);
        String s = overflow.getStringValue();
        // clip if 'hidden' or 'scroll'
        return (s.charAt(0) == 'h') || (s.charAt(0) == 's');
    }
View Full Code Here

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     * order top, right, bottom, left.
     *
     * @param e the element with the 'clip' property
     */
    public static float[] convertClip(Element e) {
        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(e);
        CSSPrimitiveValue clip =
            (CSSPrimitiveValue)decl.getPropertyCSSValueInternal
            (CSS_CLIP_PROPERTY);
        switch (clip.getPrimitiveType()) {
        case CSSPrimitiveValue.CSS_RECT:
            float [] off = new float[4];
            Rect r = clip.getRectValue();
View Full Code Here

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     * @param ctx the bridge context
     */
    public static Filter convertFilter(Element filteredElement,
                                       GraphicsNode filteredNode,
                                       BridgeContext ctx) {
        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(filteredElement);

        CSSPrimitiveValue filterValue =
            (CSSPrimitiveValue)decl.getPropertyCSSValueInternal
            (CSS_FILTER_PROPERTY);

        switch(filterValue.getPrimitiveType()){
        case CSSPrimitiveValue.CSS_IDENT:
            return null; // 'filter:none'
View Full Code Here

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     * @param ctx the bridge context
     */
    public static ClipRable convertClipPath(Element clipedElement,
                                            GraphicsNode clipedNode,
                                            BridgeContext ctx) {
        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(clipedElement);

        CSSPrimitiveValue clipValue =
            (CSSPrimitiveValue)decl.getPropertyCSSValueInternal
            (CSS_CLIP_PATH_PROPERTY);

        switch(clipValue.getPrimitiveType()){
        case CSSPrimitiveValue.CSS_IDENT:
            return null; // 'clip-path:none'
View Full Code Here

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     *
     * @param e the element interested in its a 'clip-rule'
     * @return GeneralPath.WIND_NON_ZERO | GeneralPath.WIND_EVEN_ODD
     */
    public static int convertClipRule(Element e) {
        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(e);
        return rule(decl.getPropertyCSSValueInternal(CSS_CLIP_RULE_PROPERTY));
    }
View Full Code Here

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     * @param ctx the bridge context
     */
    public static Mask convertMask(Element maskedElement,
                                   GraphicsNode maskedNode,
                                   BridgeContext ctx) {
        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(maskedElement);

        CSSPrimitiveValue maskValue =
            (CSSPrimitiveValue)decl.getPropertyCSSValueInternal
            (CSS_MASK_PROPERTY);

        switch(maskValue.getPrimitiveType()){
        case CSSPrimitiveValue.CSS_IDENT:
            return null; // 'mask:none'
View Full Code Here

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     *
     * @param e the element interested in its a 'fill-rule'
     * @return GeneralPath.WIND_NON_ZERO | GeneralPath.WIND_EVEN_ODD
     */
    public static int convertFillRule(Element e) {
        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(e);
        return rule(decl.getPropertyCSSValueInternal
                    (CSS_FILL_RULE_PROPERTY));
    }
View Full Code Here

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     *
     * @param e the lighting filter element
     * @param ctx the bridge context
     */
    public static Color convertLightingColor(Element e, BridgeContext ctx) {
        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(e);

        CSSValue colorDef = decl.getPropertyCSSValueInternal
            (CSS_LIGHTING_COLOR_PROPERTY);
        if (colorDef.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
            CSSPrimitiveValue v = (CSSPrimitiveValue)colorDef;
            return PaintServer.convertColor(v.getRGBColorValue(), 1);
        } else {
View Full Code Here

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     *
     * @param e the feFlood element
     * @param ctx the bridge context
     */
    public static Color convertFloodColor(Element e, BridgeContext ctx) {
        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(e);
        float opacity = PaintServer.convertOpacity
            (decl.getPropertyCSSValueInternal(CSS_FLOOD_OPACITY_PROPERTY));

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

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     */
    public static Color convertStopColor(Element stopElement,
                                         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);
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.