Class StrokeNode

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class StrokeNode extends RenderNode
A render node that will fill the area determined by stroking the the given Gsk.Path using the Gsk.Stroke attributes.
Since:
4.14
  • Constructor Details

    • StrokeNode

      public StrokeNode(MemorySegment address)
      Create a StrokeNode instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • StrokeNode

      public StrokeNode(RenderNode child, Path path, Stroke stroke)

      Creates a GskRenderNode that will fill the outline generated by stroking the given path using the attributes defined in stroke.

      The area is filled with child.

      GSK aims to follow the SVG semantics for stroking paths. E.g. zero-length contours will get round or square line caps drawn, regardless whether they are closed or not.

      Parameters:
      child - The node to stroke the area with
      path - The path describing the area to stroke
      stroke - The stroke attributes to use
      Since:
      4.14
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the StrokeNode class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected StrokeNode asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class RenderNode
      Returns:
      the instance as if it were its parent type
    • getChild

      public RenderNode getChild()
      Gets the child node that is getting drawn by the given node.
      Returns:
      The child that is getting drawn
      Since:
      4.14
    • getPath

      public Path getPath()
      Retrieves the path that will be stroked with the contents of the node.
      Returns:
      a GskPath
      Since:
      4.14
    • getStroke

      public Stroke getStroke()
      Retrieves the stroke attributes used in this node.
      Returns:
      a GskStroke
      Since:
      4.14