Examples of CSSOMReadOnlyStyleDeclaration


Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     */
    public static
        Rectangle2D convertEnableBackground(Element e,
                                            UnitProcessor.Context uctx) {

        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(e);
        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();
View Full Code Here

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     * @return true if the color space is linear, false otherwise (sRGB).
     */
    public static
        boolean convertColorInterpolationFilters(Element filterElement) {

        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(filterElement);
        CSSPrimitiveValue v
            = (CSSPrimitiveValue) decl.getPropertyCSSValueInternal
            (CSS_COLOR_INTERPOLATION_FILTERS_PROPERTY);

        return CSS_LINEARRGB_VALUE.equals(v.getStringValue());
    }
View Full Code Here

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     * @param e the element
     */
    public static MultipleGradientPaint.ColorSpaceEnum
        convertColorInterpolation(Element e) {

        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(e);
        CSSPrimitiveValue v
            = (CSSPrimitiveValue) decl.getPropertyCSSValueInternal
            (CSS_COLOR_INTERPOLATION_PROPERTY);

        return CSS_LINEARRGB_VALUE.equals(v.getStringValue())
            ? MultipleGradientPaint.LINEAR_RGB
            : MultipleGradientPaint.SRGB;
View Full Code Here

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     * </dl>
     *
     * @param e the element
     */
    public static Map convertShapeRendering(Element e) {
        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(e);
        CSSPrimitiveValue v = (CSSPrimitiveValue)
            decl.getPropertyCSSValueInternal(CSS_SHAPE_RENDERING_PROPERTY);
        String s = v.getStringValue();
        if (s.charAt(0) == 'a') { // auto
            return null;
        }
        Map hints = new HashMap();
View Full Code Here

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     * be used to draw text (eg. SVG Font...).</p>
     *
     * @param e the element
     */
    public static Map convertTextRendering(Element e) {
        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(e);
        CSSPrimitiveValue v = (CSSPrimitiveValue)
            decl.getPropertyCSSValueInternal(CSS_TEXT_RENDERING_PROPERTY);
        String s = v.getStringValue();
        if (s.charAt(0) == 'a') { // auto
            return null;
        }
        Map hints = new HashMap();
View Full Code Here

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     * </dl>
     *
     * @param e the element
     */
    public static Map convertImageRendering(Element e) {
        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(e);
        CSSPrimitiveValue v = (CSSPrimitiveValue)
            decl.getPropertyCSSValueInternal(CSS_IMAGE_RENDERING_PROPERTY);
        String s = v.getStringValue();
        if (s.charAt(0) == 'a') { // auto
            return null;
        }
        Map hints = new HashMap();
View Full Code Here

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     * </dl>
     *
     * @param e the element
     */
    public static Map convertColorRendering(Element e) {
        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(e);
        CSSPrimitiveValue v = (CSSPrimitiveValue)
            decl.getPropertyCSSValueInternal(CSS_COLOR_RENDERING_PROPERTY);
        String s = v.getStringValue();
        if (s.charAt(0) == 'a') { // auto
            return null;
        }
        // System.out.println("Str: " + s + "[8] = '" + s.charAt(8) + "'");
View Full Code Here

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     * otherwise. Checks the 'display' property.
     *
     * @param e the element
     */
    public static boolean convertDisplay(Element e) {
        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(e);
        CSSValue v = decl.getPropertyCSSValueInternal(CSS_DISPLAY_PROPERTY);
        return (((CSSPrimitiveValue)v).getStringValue().charAt(0) != 'n');
    }
View Full Code Here

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     * otherwise. Checks the 'visibility' property.
     *
     * @param e the element
     */
    public static boolean convertVisibility(Element e) {
        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(e);
        CSSValue v = decl.getPropertyCSSValueInternal(CSS_VISIBILITY_PROPERTY);
        if (v.getCssValueType() == CSSValue.CSS_INHERIT) {
            // workaround for the CSS2 spec which indicates that the
            // initial value is 'inherit'. So if we get 'inherit' it
            // means that we are on the outermost svg element and we
            // always return true.
View Full Code Here

Examples of org.apache.batik.css.CSSOMReadOnlyStyleDeclaration

     * specified element.
     *
     * @param e the element
     */
    public static Composite convertOpacity(Element e) {
        CSSOMReadOnlyStyleDeclaration decl = getComputedStyle(e);
        CSSValue v = decl.getPropertyCSSValueInternal
            (CSS_OPACITY_PROPERTY);
        float opacity = PaintServer.convertOpacity(v);
        if (opacity <= 0f) {
            return TRANSPARENT;
        } else if (opacity >= 1f) {
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.