0 Replies Latest reply: Nov 12, 2010 4:14 PM by PinHead RSS

    illustrator svg file opening problem

      I have an illustrator file call Piechart.svg which I want to use the problem is it will not display, I know my code works because I used sample svg files which display perfectly in the emulator.So I'm thinking am I suppose to do somethink to the illustrator svg to make it work?
      import java.io.*;
      import javax.microedition.lcdui.*;
      import javax.microedition.midlet.*;
      import javax.microedition.m2g.*;
       * @author Administrator
      public class DesignerMidlet extends MIDlet
          private Display mDisplay;
          private Displayable mDisplayable;
          public DesignerMidlet()throws IOException
          private Canvas showImage( String name )throws IOException
              InputStream in = getClass().getResourceAsStream( name );
              SVGImage svgi = ( SVGImage )ScalableImage.createImage( in, null );
              SVGAnimator svgA =  SVGAnimator.createAnimator( svgi );
              Canvas c = ( Canvas )svgA.getTargetComponent();
              svgi.setViewportHeight( c.getHeight() );
              svgi.setViewportWidth( c.getWidth() );
              return c;
          public void startApp()
                  mDisplayable = showImage( "Piechart.svg" );
              catch( IOException ie ){}
              mDisplay.getDisplay( this ).setCurrent( mDisplayable  );
          public void pauseApp()
          public void destroyApp(boolean unconditional)