Examples of SVGLength


Examples of org.w3c.dom.svg.SVGLength

  public SVGStopElement createStop()
  {
    SVGStopElementImpl sse = new SVGStopElementImpl();
    sse.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
    SVGLength offset = ((SVGLengthProperty)this.properties.get("offset")).getSVGLength();
    sse.setOffset(new SVGAnimatedNumberImpl(offset.getValue())); // what about percentages
    sse.setId(this.properties.get("id").getString());
    return sse;
  }
View Full Code Here

Examples of org.w3c.dom.svg.SVGLength

        this.name = "svg:svg";
    }

    public SVGElement createGraphic() {
        SVGSVGElementImpl svgArea = null;
        SVGLength w = ((SVGLengthProperty) this.properties.get("width")).
                      getSVGLength();
        SVGLength h = ((SVGLengthProperty) this.properties.get("height")).
                      getSVGLength();
        svgArea = new SVGSVGElementImpl();
        SVGAnimatedLengthImpl sal;
        if (w == null)
            w = new SVGLengthImpl();
        sal = new SVGAnimatedLengthImpl(w);
        sal.setBaseVal(w);
        svgArea.setWidth(sal);
        if (h == null)
            h = new SVGLengthImpl();
        sal = new SVGAnimatedLengthImpl(h);
        sal.setBaseVal(h);
        svgArea.setHeight(sal);
        SVGLength lengthProp =
          ((SVGLengthProperty) this.properties.get("x")).
          getSVGLength();
        SVGLength x = lengthProp == null ? new SVGLengthImpl() : lengthProp;
        sal = new SVGAnimatedLengthImpl(x);
        sal.setBaseVal(x);
        svgArea.setX(sal);
        lengthProp = ((SVGLengthProperty) this.properties.get("y")).
                     getSVGLength();
        SVGLength y = lengthProp == null ? new SVGLengthImpl() : lengthProp;
        sal = new SVGAnimatedLengthImpl(y);
        sal.setBaseVal(y);
        svgArea.setY(sal);

        svgArea.setStyle(
View Full Code Here

Examples of org.w3c.dom.svg.SVGLength

            // FIX-ME: should get the font-variant property
            this.fs = new FontState(area.getFontInfo(), fontFamily,
                                    fontStyle, fontWeight, fontSize, FontVariant.NORMAL);

            SVGLength length;
            length = ((SVGLengthProperty) this.properties.get("width")).getSVGLength();
            if (length == null)
                length = new SVGLengthImpl();
            this.width = length.getValue();
            length = ((SVGLengthProperty) this.properties.get("height")).
                     getSVGLength();
            if (length == null)
                length = new SVGLengthImpl();
            this.height = length.getValue();

            this.marker = 0;
        }

        /* create an SVG area */
 
View Full Code Here

Examples of org.w3c.dom.svg.SVGLength

        @Override
        public void gvtRenderingStarted(final GVTTreeRendererEvent e) {
          super.gvtRenderingStarted(e);
          final SVGDocument document = getSVGDocument();
          final SVGSVGElement rootElement = document.getRootElement();
          final SVGLength width = rootElement.getWidth().getBaseVal();
          final SVGLength height = rootElement.getHeight().getBaseVal();
          float defaultWidth = (float) Math.ceil(width.getValue());
          float defaultHeigth = (float) Math.ceil(height.getValue());
          if (defaultWidth == 1f && defaultHeigth == 1f) {
            defaultWidth = ResourceController.getResourceController().getIntProperty(
                "default_external_component_width", 200);
            defaultHeigth = ResourceController.getResourceController().getIntProperty(
                "default_external_component_height", 200);
View Full Code Here

Examples of org.w3c.dom.svg.SVGLength

        SVGLengthList ll = getBaseVal();
        int n = ll.getNumberOfItems();
        short[] types = new short[n];
        float[] values = new float[n];
        for (int i = 0; i < n; i++) {
            SVGLength l = ll.getItem(i);
            types[i] = l.getUnitType();
            values[i] = l.getValueInSpecifiedUnits();
        }
        return new AnimatableLengthListValue
            (target, types, values,
             target.getPercentageInterpretation
                 (getNamespaceURI(), getLocalName(), false));
View Full Code Here

Examples of org.w3c.dom.svg.SVGLength

    /**
     * Creates a new {@link SVGItem} object from the given {@link SVGLength}.
     */
    protected SVGItem createSVGItem(Object newItem) {
        SVGLength l = (SVGLength) newItem;
        return new SVGLengthItem(l.getUnitType(), l.getValueInSpecifiedUnits(),
                                 direction);
    }
View Full Code Here

Examples of org.w3c.dom.svg.SVGLength

    /**
     * Returns the base value of the attribute as an {@link AnimatableValue}.
     */
    public AnimatableValue getUnderlyingValue(AnimationTarget target) {
        SVGLength base = getBaseVal();
        return new AnimatableLengthValue
            (target, base.getUnitType(), base.getValueInSpecifiedUnits(),
             target.getPercentageInterpretation
                 (getNamespaceURI(), getLocalName(), false));
    }
View Full Code Here

Examples of org.w3c.dom.svg.SVGLength

  }

  public GraphicImpl createGraphic()
  {
    /* retrieve properties */
    SVGLength cx = ((SVGLengthProperty)this.properties.get("cx")).getSVGLength();
    SVGLength cy = ((SVGLengthProperty)this.properties.get("cy")).getSVGLength();
    SVGLength r = ((SVGLengthProperty)this.properties.get("r")).getSVGLength();
    SVGCircleElementImpl graph = new SVGCircleElementImpl();
    graph.setCx(new SVGAnimatedLengthImpl(cx));
    graph.setCy(new SVGAnimatedLengthImpl(cy));
    graph.setR(new SVGAnimatedLengthImpl(r));
    graph.setStyle(((SVGStyle)this.properties.get("style")).getStyle());
View Full Code Here

Examples of org.w3c.dom.svg.SVGLength

  }

  public GraphicImpl createGraphic()
  {
    /* retrieve properties */
    SVGLength x1 = ((SVGLengthProperty)this.properties.get("x1")).getSVGLength();
    SVGLength x2 = ((SVGLengthProperty)this.properties.get("x2")).getSVGLength();
    SVGLength y1 = ((SVGLengthProperty)this.properties.get("y1")).getSVGLength();
    SVGLength y2 = ((SVGLengthProperty)this.properties.get("y2")).getSVGLength();
    SVGLineElementImpl graph = new SVGLineElementImpl();
    graph.setX1(new SVGAnimatedLengthImpl(x1));
    graph.setY1(new SVGAnimatedLengthImpl(y1));
    graph.setX2(new SVGAnimatedLengthImpl(x2));
    graph.setY2(new SVGAnimatedLengthImpl(y2));
View Full Code Here

Examples of org.w3c.dom.svg.SVGLength

  }

  public GraphicImpl createGraphic()
  {
    /* retrieve properties */
    SVGLength width = ((SVGLengthProperty)this.properties.get("width")).getSVGLength();
    SVGLength height = ((SVGLengthProperty)this.properties.get("height")).getSVGLength();
    SVGLength x = ((SVGLengthProperty)this.properties.get("x")).getSVGLength();
    SVGLength y = ((SVGLengthProperty)this.properties.get("y")).getSVGLength();
    SVGLength rx = ((SVGLengthProperty)this.properties.get("rx")).getSVGLength();
    SVGLength ry = ((SVGLengthProperty)this.properties.get("ry")).getSVGLength();
    SVGRectElementImpl graph = new SVGRectElementImpl();
    graph.setX(new SVGAnimatedLengthImpl(x));
    graph.setY(new SVGAnimatedLengthImpl(y));
    graph.setRx(new SVGAnimatedLengthImpl(rx));
    graph.setRy(new SVGAnimatedLengthImpl(ry));
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.