Package org.freedesktop.harfbuzz
Class ColorStop
java.lang.Object
org.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.
- Since:
- 7.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionAllocate 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 MemoryLayoutThe memory layout of the native struct.static @Nullable TypegetType()Get the GType of the ColorStop classRead the value of the fieldcolor.Read the value of the fieldis_foreground.floatRead the value of the fieldoffset.voidwriteColor(Color color) Write a value in the fieldcolor.voidwriteIsForeground(Bool isForeground) Write a value in the fieldis_foreground.voidwriteOffset(float offset) Write a value in the fieldoffset.Methods inherited from class org.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 fieldoffsetisForeground- value for the fieldisForegroundcolor- value for the fieldcolorarena- 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 fieldoffsetisForeground- value for the fieldisForegroundcolor- 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
-