public class SvgImage
extends java.lang.Object
Constructor and Description |
---|
SvgImage(Path[] paths)
Creates a SVG image with its paths.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(ej.microui.display.GraphicsContext g)
Draws the paths with an identity matrix,
vg_lite.VG_LITE_FILL_EVEN_ODD and
vg_lite.VG_LITE_BLEND_NONE . |
void |
draw(ej.microui.display.GraphicsContext g,
com.verisilicon.vivante.vg_lite_matrix matrix)
Draws the paths with the given parameters.
|
float |
getHeight()
Gets the height of the SVG image viewport.
|
static SvgImage |
getSvgImage(java.lang.String name)
Gets the SVG image instance with the given name.
|
float |
getWidth()
Gets the width of the SVG image viewport.
|
public SvgImage(Path[] paths)
paths
- the paths of the SVG image.public static SvgImage getSvgImage(java.lang.String name)
name
- the name of the image (example: mascot_microej.svg
).java.util.NoSuchElementException
- if the image does not exist.public void draw(ej.microui.display.GraphicsContext g)
vg_lite.VG_LITE_FILL_EVEN_ODD
and
vg_lite.VG_LITE_BLEND_NONE
.
Warning: this method is compatible with com.microej.api#vivante-vglite-0.5.0 or later (new matrix is an identity matrix).
g
- the graphics context to draw on.public void draw(ej.microui.display.GraphicsContext g, com.verisilicon.vivante.vg_lite_matrix matrix)
g
- the graphics context to draw on.matrix
- the matrix to apply on the paths.public float getWidth()
public float getHeight()