Package org.gnome.pango
Class AttrSize
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.pango.AttrSize
- All Implemented Interfaces:
Proxy
The
PangoAttrSize structure is used to represent attributes which
set font size.-
Constructor Summary
ConstructorsConstructorDescriptionAttrSize()Allocate a new AttrSize.Allocate a new AttrSize.AttrSize(MemorySegment address) Create a AttrSize proxy instance for the provided memory address.Allocate a new AttrSize with the fields set to the provided values.Allocate a new AttrSize with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayoutThe memory layout of the native struct.static Attributenew_(int size) Create a new font-size attribute in fractional points.static AttributenewAbsolute(int size) Create a new font-size attribute in device units.@Nullable AttributereadAttr()Read the value of the fieldattr.intreadSize()Read the value of the fieldsize.voidWrite a value in the fieldattr.voidwriteSize(int size) Write a value in the fieldsize.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
AttrSize
Create a AttrSize proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
AttrSize
Allocate a new AttrSize.- Parameters:
arena- to control the memory allocation scope
-
AttrSize
public AttrSize()Allocate a new AttrSize. The memory is allocated withArena.ofAuto(). -
AttrSize
-
AttrSize
Allocate a new AttrSize with the fields set to the provided values. The memory is allocated withArena.ofAuto().- Parameters:
attr- value for the fieldattrsize- value for the fieldsize
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readAttr
Read the value of the fieldattr.- Returns:
- The value of the field
attr
-
writeAttr
Write a value in the fieldattr.- Parameters:
attr- The new value for the fieldattr
-
readSize
public int readSize()Read the value of the fieldsize.- Returns:
- The value of the field
size
-
writeSize
public void writeSize(int size) Write a value in the fieldsize.- Parameters:
size- The new value for the fieldsize
-
new_
Create a new font-size attribute in fractional points.- Parameters:
size- the font size, inPANGO_SCALE-ths of a point- Returns:
- the newly allocated
PangoAttribute, which should be freed withAttribute.destroy()
-
newAbsolute
Create a new font-size attribute in device units.- Parameters:
size- the font size, inPANGO_SCALE-ths of a device unit- Returns:
- the newly allocated
PangoAttribute, which should be freed withAttribute.destroy() - Since:
- 1.8
-