Code example for Picture

Methods: drawgetHeightgetWidth

0
        // default implementation will load the file as a bitmap and create 
        // a BitmapDrawable from it 
//        Log.d(TAG, "Get Drawable Vector"); 
        SVG svg = SVGParser.getSVGFromInputStream(aFileInputStream);
       Picture pic = svg.getPicture();
       Bitmap bm = Bitmap.createBitmap(pic.getWidth(), pic.getHeight(), Bitmap.Config.ARGB_8888);
       Canvas c = new Canvas(bm);
       pic.draw(c);
       return new BitmapDrawable(bm);
//       return bm; 
        
//        Log.d(TAG, "SVG is create"); 
//        try { 
//            PictureDrawable draw = svg.createPictureDrawable(); 
//            Log.d(TAG, "Get Drawable Vector : " + draw.getBounds()); 
//            return draw; 
//        } catch (java.lang.UnsupportedOperationException e) { 
//            Log.e(TAG, e.getMessage()); 
//            return null; 
//        }