Package io.github.humbleui.skija.svg
Class SVGCanvas
- java.lang.Object
-
- io.github.humbleui.skija.svg.SVGCanvas
-
public class SVGCanvas extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SVGCanvas()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long_nMake(float left, float top, float right, float bottom, long wstreamPtr, int flags)static @NotNull Canvasmake(@NotNull io.github.humbleui.types.Rect bounds, @NotNull WStream out, boolean convertTextToPaths, boolean prettyXML)Returns a new canvas that will generate SVG commands from its draw calls, and send them to the provided stream.static Canvasmake(io.github.humbleui.types.Rect bounds, WStream out)Returns a new canvas that will generate SVG commands from its draw calls, and send them to the provided stream.
-
-
-
Method Detail
-
make
public static Canvas make(io.github.humbleui.types.Rect bounds, WStream out)
Returns a new canvas that will generate SVG commands from its draw calls, and send them to the provided stream. Ownership of the stream is not transfered, and it must remain valid for the lifetime of the returned canvas. The canvas may buffer some drawing calls, so the output is not guaranteed to be valid or complete until the canvas instance is deleted.- Parameters:
bounds- defines an initial SVG viewport (viewBox attribute on the root SVG element).out- stream SVG commands will be written to- Returns:
- new Canvas
-
make
@NotNull @Contract("_, _, _, _ -> new") public static @NotNull Canvas make(@NotNull @NotNull io.github.humbleui.types.Rect bounds, @NotNull @NotNull WStream out, boolean convertTextToPaths, boolean prettyXML)Returns a new canvas that will generate SVG commands from its draw calls, and send them to the provided stream. Ownership of the stream is not transfered, and it must remain valid for the lifetime of the returned canvas. The canvas may buffer some drawing calls, so the output is not guaranteed to be valid or complete until the canvas instance is deleted.- Parameters:
bounds- defines an initial SVG viewport (viewBox attribute on the root SVG element).out- stream SVG commands will be written toconvertTextToPaths- emit text as <path>sprettyXML- add newlines and tabs in output- Returns:
- new Canvas
-
_nMake
@Internal public static long _nMake(float left, float top, float right, float bottom, long wstreamPtr, int flags)
-
-