Package ch.bailu.gtk.gdk
Klasse Rectangle
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.gdk.Rectangle
- Alle implementierten Schnittstellen:
PointerInterface
Represents a rectangle.
`GdkRectangle` is identical to `cairo_rectangle_t`. Together with Cairo’s
`cairo_region_t` data type, these are the central types for representing
sets of pixels.
The intersection of two rectangles can be computed with
[method@Gdk.Rectangle.intersect]; to find the union of two rectangles use
[method@Gdk.Rectangle.union].
The `cairo_region_t` type provided by Cairo is usually used for managing
non-rectangular clipping of graphical operations.
The Graphene library has a number of other data types for regions and
volumes in 2D and 3D.
`GdkRectangle` is identical to `cairo_rectangle_t`. Together with Cairo’s
`cairo_region_t` data type, these are the central types for representing
sets of pixels.
The intersection of two rectangles can be computed with
[method@Gdk.Rectangle.intersect]; to find the union of two rectangles use
[method@Gdk.Rectangle.union].
The `cairo_region_t` type provided by Cairo is usually used for managing
non-rectangular clipping of graphical operations.
The Graphene library has a number of other data types for regions and
volumes in 2D and 3D.
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
containsPoint
(int x, int y) Returns %TRUE if @rect contains the point described by @x and @y.boolean
Checks if the two given rectangles are equal.static ClassHandler
int
the height of the rectangleint
the width of the rectangleint
the x coordinate of the top left cornerint
the y coordinate of the top left cornerstatic int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
boolean
Calculates the intersection of two rectangles.void
setFieldHeight
(int height) the height of the rectanglevoid
setFieldWidth
(int width) the width of the rectanglevoid
setFieldX
(int x) the x coordinate of the top left cornervoid
setFieldY
(int y) the y coordinate of the top left cornervoid
Calculates the union of two rectangles.Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
X
the x coordinate of the top left corner- Siehe auch:
-
Y
the y coordinate of the top left corner- Siehe auch:
-
WIDTH
the width of the rectangle- Siehe auch:
-
HEIGHT
the height of the rectangle- Siehe auch:
-
-
Konstruktordetails
-
Rectangle
-
Rectangle
public Rectangle()
-
-
Methodendetails
-
getClassHandler
-
setFieldX
public void setFieldX(int x) the x coordinate of the top left corner -
getFieldX
public int getFieldX()the x coordinate of the top left corner -
setFieldY
public void setFieldY(int y) the y coordinate of the top left corner -
getFieldY
public int getFieldY()the y coordinate of the top left corner -
setFieldWidth
public void setFieldWidth(int width) the width of the rectangle -
getFieldWidth
public int getFieldWidth()the width of the rectangle -
setFieldHeight
public void setFieldHeight(int height) the height of the rectangle -
getFieldHeight
public int getFieldHeight()the height of the rectangle -
containsPoint
public boolean containsPoint(int x, int y) Returns %TRUE if @rect contains the point described by @x and @y.- Parameter:
x
- X coordinatey
- Y coordinate- Gibt zurück:
- %TRUE if @rect contains the point
-
equal
Checks if the two given rectangles are equal.- Parameter:
rect2
- a `GdkRectangle`- Gibt zurück:
- %TRUE if the rectangles are equal.
-
intersect
Calculates the intersection of two rectangles.
It is allowed for @dest to be the same as either @src1 or @src2.
If the rectangles do not intersect, @dest’s width and height is set
to 0 and its x and y values are undefined. If you are only interested
in whether the rectangles intersect, but not in the intersecting area
itself, pass %NULL for @dest.- Parameter:
src2
- a `GdkRectangle`dest
- return location for the intersection of @src1 and @src2- Gibt zurück:
- %TRUE if the rectangles intersect.
-
union
Calculates the union of two rectangles.
The union of rectangles @src1 and @src2 is the smallest rectangle which
includes both @src1 and @src2 within it. It is allowed for @dest to be
the same as either @src1 or @src2.
Note that this function does not ignore 'empty' rectangles (ie. with
zero width or height).- Parameter:
src2
- a `GdkRectangle`dest
- return location for the union of @src1 and @src2
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-