Record Class Rect

java.lang.Object
java.lang.Record
org.freedesktop.cairo.Rect
Record Components:
x - X coordinate of the left side of the rectangle
y - Y coordinate of the top side of the rectangle
width - width of the rectangle
height - height of the rectangle

public record Rect(double x, double y, double width, double height) extends Record
A rectangle.

This is one of several helper classes in Java (see also RGBA and Point), that do not exist in the native cairo API. The difference between Rect and Rectangle is that the latter class is part of the native cairo API and stores its values in native memory, while Rect instances only exist in the JVM.

Since:
1.18.1