Package org.gnome.gsk
Class ConicGradientNode
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gsk.RenderNode
org.gnome.gsk.ConicGradientNode
-
Nested Class Summary
Nested classes/interfaces inherited from class org.gnome.gsk.RenderNode
RenderNode.RenderNode$Impl -
Constructor Summary
ConstructorsConstructorDescriptionConicGradientNode(MemorySegment address) Create a ConicGradientNode proxy instance for the provided memory address.ConicGradientNode(Rect bounds, Point center, float rotation, @Nullable ColorStop @Nullable [] colorStops) Creates aGskRenderNodethat draws a conic gradient. -
Method Summary
Modifier and TypeMethodDescriptionprotected ConicGradientNodeasParent()Returns this instance as if it were its parent type.floatgetAngle()Retrieves the angle for the gradient in radians, normalized in [0, 2 * PI].Retrieves the center pointer for the gradient.Retrieves the color stops in the gradient.longRetrieves the number of color stops in the gradient.floatRetrieves the rotation for the gradient in degrees.static @Nullable TypegetType()Get the GType of the ConicGradientNode classMethods inherited from class org.gnome.gsk.RenderNode
deserialize, draw, getBounds, getNodeType, getOpaqueRect, ref, serialize, unref, writeToFileMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getMemoryLayout, getPrivate, readGClass, writeGClassMethods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
ConicGradientNode
Create a ConicGradientNode proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
ConicGradientNode
public ConicGradientNode(Rect bounds, Point center, float rotation, @Nullable ColorStop @Nullable [] colorStops) Creates aGskRenderNodethat draws a conic gradient.The conic gradient starts around
centerin the direction ofrotation.A rotation of 0 means that the gradient points up. Color stops are then added clockwise.- Parameters:
bounds- the bounds of the nodecenter- the center of the gradientrotation- the rotation of the gradient in degreescolorStops- a pointer to an array ofGskColorStopdefining 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
Get the GType of the ConicGradientNode class- Returns:
- the GType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName(). This will call the native function pointer of this virtual method in the typeclass of the parent type.- Overrides:
asParentin classRenderNode
-
getAngle
public float getAngle()Retrieves the angle for the gradient in radians, normalized in [0, 2 * PI].The angle is starting at the top and going clockwise, as expressed in the css specification:
angle = 90 - gsk_conic_gradient_node_get_rotation()
- Returns:
- the angle for the gradient
- Since:
- 4.2
-
getCenter
Retrieves the center pointer for the gradient.- Returns:
- the center point for the gradient
-
getColorStops
Retrieves the color stops in the gradient.- Returns:
- the color stops in the gradient
-
getNColorStops
public long getNColorStops()Retrieves the number of color stops in the gradient.- Returns:
- the number of color stops
-
getRotation
public float getRotation()Retrieves the rotation for the gradient in degrees.- Returns:
- the rotation for the gradient
-