Class 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 Canvas make​(@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 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SVGCanvas

        public SVGCanvas()
    • 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 to
        convertTextToPaths - emit text as <path>s
        prettyXML - 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)