Package org.freedesktop.harfbuzz
Class Variation
java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.harfbuzz.Variation
- All Implemented Interfaces:
Proxy
Data type for holding variation data. Registered OpenType
variation-axis tags are listed in
OpenType Axis Tag Registry.
- Since:
- 1.4.2
-
Constructor Summary
ConstructorsConstructorDescriptionAllocate a new Variation.Allocate a new Variation.Variation(MemorySegment address) Create a Variation proxy instance for the provided memory address.Allocate a new Variation with the fields set to the provided values.Allocate a new Variation with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayoutThe memory layout of the native struct.readTag()Read the value of the fieldtag.floatRead the value of the fieldvalue.voidvariationToString(@Nullable Out<String[]> buf) Converts anhb_variation_tinto aNULL-terminated string in the format understood by hb_variation_from_string().voidWrite a value in the fieldtag.voidwriteValue(float value) Write a value in the fieldvalue.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
Variation
Create a Variation proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
Variation
Allocate a new Variation.- Parameters:
arena- to control the memory allocation scope
-
Variation
public Variation()Allocate a new Variation. The memory is allocated withArena.ofAuto(). -
Variation
-
Variation
Allocate a new Variation with the fields set to the provided values. The memory is allocated withArena.ofAuto().- Parameters:
tag- value for the fieldtagvalue- value for the fieldvalue
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readTag
-
writeTag
Write a value in the fieldtag.- Parameters:
tag- The new value for the fieldtag
-
readValue
public float readValue()Read the value of the fieldvalue.- Returns:
- The value of the field
value
-
writeValue
public void writeValue(float value) Write a value in the fieldvalue.- Parameters:
value- The new value for the fieldvalue
-
variationToString
Converts anhb_variation_tinto aNULL-terminated string in the format understood by hb_variation_from_string(). The client in responsible for allocating big enough size forbuf,128 bytes is more than enough.Note that the string won't include any whitespace.
- Parameters:
buf- output string- Since:
- 1.4.2
-