Class RadialGradientNode

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class RadialGradientNode extends RenderNode
A render node for a radial gradient.
  • Constructor Details

    • RadialGradientNode

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

      public RadialGradientNode(Rect bounds, Point center, float hradius, float vradius, float start, float end, @Nullable ColorStop @Nullable [] colorStops)

      Creates a GskRenderNode that draws a radial gradient.

      The radial gradient starts around center. The size of the gradient is dictated by hradius in horizontal orientation and by vradius in vertical orientation.

      Parameters:
      bounds - the bounds of the node
      center - the center of the gradient
      hradius - the horizontal radius
      vradius - the vertical radius
      start - a percentage >= 0 that defines the start of the gradient around center
      end - a percentage >= 0 that defines the end of the gradient around center
      colorStops - a pointer to an array of GskColorStop defining the gradient. The offsets of all color stops must be increasing. The first stop's offset must be >= 0 and the last stop's offset must be <= 1.
  • Method Details

    • getType

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

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

      protected RadialGradientNode 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
    • getCenter

      public Point getCenter()
      Retrieves the center pointer for the gradient.
      Returns:
      the center point for the gradient
    • getColorStops

      public ColorStop[] getColorStops()
      Retrieves the color stops in the gradient.
      Returns:
      the color stops in the gradient
    • getEnd

      public float getEnd()
      Retrieves the end value for the gradient.
      Returns:
      the end value for the gradient
    • getHradius

      public float getHradius()
      Retrieves the horizontal radius for the gradient.
      Returns:
      the horizontal radius for the gradient
    • getNColorStops

      public long getNColorStops()
      Retrieves the number of color stops in the gradient.
      Returns:
      the number of color stops
    • getStart

      public float getStart()
      Retrieves the start value for the gradient.
      Returns:
      the start value for the gradient
    • getVradius

      public float getVradius()
      Retrieves the vertical radius for the gradient.
      Returns:
      the vertical radius for the gradient