Package org.freedesktop.harfbuzz
Class ColorStop
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.freedesktop.harfbuzz.ColorStop
- All Implemented Interfaces:
Proxy
Information about a color stop on a color line.
Color lines typically have offsets ranging between 0 and 1, but that is not required.
Note: despite color
being unpremultiplied here, interpolation in
gradients shall happen in premultiplied space. See the OpenType spec
COLR
section for details.
-
Constructor Summary
ConstructorDescriptionAllocate a new ColorStop.Allocate a new ColorStop with the fields set to the provided values.Allocate a new ColorStop with the fields set to the provided values.Allocate a new ColorStop.ColorStop
(MemorySegment address) Create a ColorStop proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayout
The memory layout of the native struct.static Type
getType()
Get the GType of the ColorStop classRead the value of the fieldcolor
.Read the value of the fieldis_foreground
.float
Read the value of the fieldoffset
.void
writeColor
(Color color) Write a value in the fieldcolor
.void
writeIsForeground
(Bool isForeground) Write a value in the fieldis_foreground
.void
writeOffset
(float offset) Write a value in the fieldoffset
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
ColorStop
Create a ColorStop proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
ColorStop
Allocate a new ColorStop.- Parameters:
arena
- to control the memory allocation scope
-
ColorStop
public ColorStop()Allocate a new ColorStop. The memory is allocated withArena.ofAuto()
. -
ColorStop
Allocate a new ColorStop with the fields set to the provided values.- Parameters:
offset
- value for the fieldoffset
isForeground
- value for the fieldisForeground
color
- value for the fieldcolor
arena
- to control the memory allocation scope
-
ColorStop
Allocate a new ColorStop with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
offset
- value for the fieldoffset
isForeground
- value for the fieldisForeground
color
- value for the fieldcolor
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readOffset
public float readOffset()Read the value of the fieldoffset
.- Returns:
- The value of the field
offset
-
writeOffset
public void writeOffset(float offset) Write a value in the fieldoffset
.- Parameters:
offset
- The new value for the fieldoffset
-
readIsForeground
Read the value of the fieldis_foreground
.- Returns:
- The value of the field
is_foreground
-
writeIsForeground
Write a value in the fieldis_foreground
.- Parameters:
isForeground
- The new value for the fieldis_foreground
-
readColor
-
writeColor
Write a value in the fieldcolor
.- Parameters:
color
- The new value for the fieldcolor
-