Package org.gnome.gsk
Class OutsetShadowNode
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gsk.RenderNode
org.gnome.gsk.OutsetShadowNode
-
Nested Class Summary
Nested classes/interfaces inherited from class org.gnome.gsk.RenderNode
RenderNode.RenderNodeImpl
-
Constructor Summary
ConstructorDescriptionOutsetShadowNode
(MemorySegment address) Create a OutsetShadowNode proxy instance for the provided memory address.OutsetShadowNode
(RoundedRect outline, RGBA color, float dx, float dy, float spread, float blurRadius) Creates aGskRenderNode
that will render an outset shadow around the box given byoutline
. -
Method Summary
Modifier and TypeMethodDescriptionprotected OutsetShadowNode
asParent()
Returns this instance as if it were its parent type.float
Retrieves the blur radius of the shadow.getColor()
Retrieves the color of the outset shadow.float
getDx()
Retrieves the horizontal offset of the outset shadow.float
getDy()
Retrieves the vertical offset of the outset shadow.Retrieves the outline rectangle of the outset shadow.float
Retrieves how much the shadow spreads outwards.static Type
getType()
Get the GType of the OutsetShadowNode classMethods inherited from class org.gnome.gsk.RenderNode
deserialize, draw, getBounds, getNodeType, getOpaqueRect, ref, serialize, unref, writeToFile
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getMemoryLayout, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
OutsetShadowNode
Create a OutsetShadowNode proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
OutsetShadowNode
public OutsetShadowNode(RoundedRect outline, RGBA color, float dx, float dy, float spread, float blurRadius) Creates aGskRenderNode
that will render an outset shadow around the box given byoutline
.- Parameters:
outline
- outline of the region surrounded by shadowcolor
- color of the shadowdx
- horizontal offset of shadowdy
- vertical offset of shadowspread
- how far the shadow spreads towards the insideblurRadius
- how much blur to apply to the shadow
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, 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:
asParent
in classRenderNode
-
getBlurRadius
public float getBlurRadius()Retrieves the blur radius of the shadow.- Returns:
- the blur radius, in pixels
-
getColor
Retrieves the color of the outset shadow.The value returned by this function will not be correct if the render node was created for a non-sRGB color.
- Returns:
- a color
-
getDx
public float getDx()Retrieves the horizontal offset of the outset shadow.- Returns:
- an offset, in pixels
-
getDy
public float getDy()Retrieves the vertical offset of the outset shadow.- Returns:
- an offset, in pixels
-
getOutline
Retrieves the outline rectangle of the outset shadow.- Returns:
- a rounded rectangle
-
getSpread
public float getSpread()Retrieves how much the shadow spreads outwards.- Returns:
- the size of the shadow, in pixels
-