Package limn.graphics
Interface SvgRenderer.Document
- All Superinterfaces:
AutoCloseable
- Enclosing interface:
SvgRenderer
One SVG, opened: measured, drawn and changed until it is closed.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Lets the document go.floatheight()render(int width, int height) Draws the whole document scaled towidthbyheightpixels.booleansetAttribute(String id, String name, String value) Changes one attribute of the element with that id, for the drawings after this.floatwidth()
-
Method Details
-
width
float width()- Returns:
- its width in its own units, above 0
-
height
float height()- Returns:
- its height in its own units, above 0
-
setAttribute
Changes one attribute of the element with that id, for the drawings after this.- Parameters:
id- the element's idname- the attribute's namevalue- its new value, as it would be written in the file- Returns:
- whether the document has such an element
-
render
Draws the whole document scaled towidthbyheightpixels.- Parameters:
width- at least 1height- at least 1- Returns:
- the picture, straight-alpha RGBA8 with row 0 at the top
-
close
void close()Lets the document go. Idempotent.- Specified by:
closein interfaceAutoCloseable
-