Package org.gnome.rsvg
Class Rectangle
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.rsvg.Rectangle
-
Constructor Summary
ConstructorsConstructorDescriptionAllocate a new Rectangle.Rectangle(double x, double y, double width, double height) Allocate a new Rectangle with the fields set to the provided values.Allocate a new Rectangle with the fields set to the provided values.Allocate a new Rectangle.Rectangle(MemorySegment address) Create a Rectangle proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayoutThe memory layout of the native struct.doubleRead the value of the fieldheight.doubleRead the value of the fieldwidth.doublereadX()Read the value of the fieldx.doublereadY()Read the value of the fieldy.voidwriteHeight(double height) Write a value in the fieldheight.voidwriteWidth(double width) Write a value in the fieldwidth.voidwriteX(double x) Write a value in the fieldx.voidwriteY(double y) Write a value in the fieldy.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
Rectangle
Create a Rectangle proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
Rectangle
Allocate a new Rectangle.- Parameters:
arena- to control the memory allocation scope
-
Rectangle
public Rectangle()Allocate a new Rectangle. The memory is allocated withArena.ofAuto(). -
Rectangle
Allocate a new Rectangle with the fields set to the provided values.- Parameters:
x- value for the fieldxy- value for the fieldywidth- value for the fieldwidthheight- value for the fieldheightarena- to control the memory allocation scope
-
Rectangle
public Rectangle(double x, double y, double width, double height) Allocate a new Rectangle with the fields set to the provided values. The memory is allocated withArena.ofAuto().- Parameters:
x- value for the fieldxy- value for the fieldywidth- value for the fieldwidthheight- value for the fieldheight
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readX
public double readX()Read the value of the fieldx.- Returns:
- The value of the field
x
-
writeX
public void writeX(double x) Write a value in the fieldx.- Parameters:
x- The new value for the fieldx
-
readY
public double readY()Read the value of the fieldy.- Returns:
- The value of the field
y
-
writeY
public void writeY(double y) Write a value in the fieldy.- Parameters:
y- The new value for the fieldy
-
readWidth
public double readWidth()Read the value of the fieldwidth.- Returns:
- The value of the field
width
-
writeWidth
public void writeWidth(double width) Write a value in the fieldwidth.- Parameters:
width- The new value for the fieldwidth
-
readHeight
public double readHeight()Read the value of the fieldheight.- Returns:
- The value of the field
height
-
writeHeight
public void writeHeight(double height) Write a value in the fieldheight.- Parameters:
height- The new value for the fieldheight
-