Examples of loadSVG()


Examples of com.kitfox.svg.SVGUniverse.loadSVG()

      _points = (List<Point>) RessourceManager.getRessource(key);
      if (_points == null) {
        try {
          SVGUniverse svgUniverse = new SVGUniverse();
          StringReader reader = new StringReader(svg);
          SVGDiagram diagram = svgUniverse.getDiagram(svgUniverse.loadSVG(reader, "svgImage"));

          int imgWidth = Tools.FTOI(diagram.getWidth() * resolution_multiplier);
          int imgHeight = Tools.FTOI(diagram.getHeight() * resolution_multiplier);

          //          SVGRoot root = diagram.getRoot();
View Full Code Here

Examples of com.kitfox.svg.SVGUniverse.loadSVG()

      if (currFile.exists()) {

        SVGUniverse svgUniverse = new SVGUniverse();
        String svg = Tools.readUTF8Textfile(currFile.getAbsolutePath());
        StringReader reader = new StringReader(svg);
        SVGDiagram diagram = svgUniverse.getDiagram(svgUniverse.loadSVG(reader, "svgImage"));

        int imgWidth = this.getPreferredSize().width;
        int imgHeight = this.getPreferredSize().height - BUTTON_HEIGHT;

        SimpleImage imgMap = new SimpleImage(imgWidth, imgHeight);
View Full Code Here

Examples of com.kitfox.svg.SVGUniverse.loadSVG()

        URI uri;

        if (!CheckBoxMenuItem_anonInputStream.isSelected())
        {
            //Load from a disk with a valid URL
            uri = universe.loadSVG(url);

            if (verbose) System.err.println("Loading document " + uri.toString());

            diagram = universe.getDiagram(uri);
        }
View Full Code Here

Examples of com.kitfox.svg.SVGUniverse.loadSVG()

        {
            //Load from a stream with no particular valid URL
            try
            {
                InputStream is = url.openStream();
                uri = universe.loadSVG(is, "defaultName");

                if (verbose) System.err.println("Loading document " + uri.toString());
            }
            catch (Exception e)
            {
View Full Code Here

Examples of com.kitfox.svg.SVGUniverse.loadSVG()

    private static final String NAME_PREFIX = "svgimage_";

    @Override
    public SVGDiagram readObject(InputStream inputStream) throws IOException {
        SVGUniverse universe = SVGCache.getSVGUniverse();
        URI location = universe.loadSVG(inputStream, NAME_PREFIX + (index++));
        return universe.getDiagram(location, true);
    }

    @Override
    public void writeObject(SVGDiagram diagram, OutputStream outputStream) {
View Full Code Here

Examples of com.kitfox.svg.SVGUniverse.loadSVG()

    g2d.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON );

    // Draw graphics
    try {
      SVGUniverse universe = SVGCache.getSVGUniverse();
      SVGDiagram diagram = universe.getDiagram( universe.loadSVG( is, name ));
      if ( diagram != null ) {
        SVGRoot root = diagram.getRoot();
        root.setAttribute( "width", AnimationElement.AT_XML, Double.toString( width ));
        root.setAttribute( "height", AnimationElement.AT_XML, Double.toString( height ));
        root.build();  
View Full Code Here

Examples of com.kitfox.svg.SVGUniverse.loadSVG()

    Interface refInterface;
    public PanelWithAnimation(Interface in) throws Exception{
      // konstruktor przyjmujacy referencje
      refInterface=in;
        SVGUniverse svgUniverse = new SVGUniverse();
        URI uri = svgUniverse.loadSVG(getClass().getResourceAsStream("Picture1.svg"), "Rysunek");
        svgDiagram = svgUniverse.getDiagram(uri);
        //przygotowanie obrazka
       
    }
View Full Code Here

Examples of org.mt4j.util.xml.svg.SVGLoader.loadSvg()

    initTiles();
  }
 
  private void initTiles(){
    SVGLoader l = new SVGLoader(app);
    MTComponent knob = l.loadSvg(svgPath + svgname);
    MTPolygon knobRight = (MTPolygon) knob.getChildByIndex(0).getChildByIndex(0);
    knobRight.setNoFill(false);
    knobRight.setUseDisplayList(false);
    float origHeight = knobRight.getHeightXY(TransformSpace.LOCAL);
   
View Full Code Here

Examples of org.mt4j.util.xml.svg.SVGLoader.loadSvg()

    this.addGestureListener(RotateProcessor.class, new DefaultRotateAction());
    this.registerInputProcessor(new ScaleProcessor(applet));
    this.addGestureListener(ScaleProcessor.class, new DefaultScaleAction());
   
    SVGLoader loader = new SVGLoader(applet);
    MTComponent svg = loader.loadSvg(fileName);
    this.addChild(svg);
   
   
    //so lange MTSvg noch nicht an einem vater h�ngt und transform=identity, ist die world width die
    //parent relative width (und local width?)
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.