com.larvalabs.svgandroid
Class SVG

java.lang.Object
  extended by com.larvalabs.svgandroid.SVG

public class SVG
extends java.lang.Object

Describes a vector Picture object, and optionally its bounds.

Author:
Larva Labs, LLC

Method Summary
 android.graphics.drawable.PictureDrawable createPictureDrawable()
          Create a picture drawable from the SVG.
 android.graphics.RectF getBounds()
          Gets the bounding rectangle for the SVG, if one was specified.
 android.graphics.RectF getLimits()
          Gets the bounding rectangle for the SVG that was computed upon parsing.
 android.graphics.Picture getPicture()
          Get the parsed SVG picture data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createPictureDrawable

public android.graphics.drawable.PictureDrawable createPictureDrawable()
Create a picture drawable from the SVG.

Returns:
the PictureDrawable.

getPicture

public android.graphics.Picture getPicture()
Get the parsed SVG picture data.

Returns:
the picture.

getBounds

public android.graphics.RectF getBounds()
Gets the bounding rectangle for the SVG, if one was specified.

Returns:
rectangle representing the bounds.

getLimits

public android.graphics.RectF getLimits()
Gets the bounding rectangle for the SVG that was computed upon parsing. It may not be entirely accurate for certain curves or transformations, but is often better than nothing.

Returns:
rectangle representing the computed bounds.