Rectangle
Object Hierarchy:
Description:
[ CCode ( copy_function = "g_boxed_copy" , free_function = "g_boxed_free" , type_id = "gegl_rectangle_get_type ()" ) ]
[ Compact ]
public class Rectangle
[ Compact ]
public class Rectangle
Namespace: Gegl
Package: gegl-0.4
Content:
Static methods:
- public static Rectangle infinite_plane ()
Creation methods:
- public Rectangle (int x, int y, uint width, uint height)
Creates a new rectangle set with the values from
x
,y
,width
andheight
.
Methods:
- public void @set (int x, int y, uint width, uint height)
Sets the
x
,y
,width
andheight
on this. - public bool align (Rectangle rectangle, Rectangle tile, RectangleAlignment alignment)
Aligns
rectangle
to a regular tile grid, of whichtile
is a representative tile, and stores the result in this. - public bool align_to_buffer (Rectangle rectangle, Buffer buffer, RectangleAlignment alignment)
Aligns
rectangle
to the tile grid ofbuffer
, and stores the result in this. - public void bounding_box (Rectangle source1, Rectangle source2)
Computes the bounding box of the rectangles
source1
andsource2
and stores the resulting bounding box in this. - public bool contains (Rectangle child)
Checks if the Rectangle
child
is fully contained within this. - public void copy (Rectangle source)
Copies the rectangle information stored in
source
over the information in this. - public void dump ()
For debugging purposes, not stable API.
- public Rectangle dup ()
Create a new copy of this.
- public bool equal (Rectangle rectangle2)
Check if two Rectangles are equal.
- public bool equal_coords (int x, int y, int width, int height)
Check if a rectangle is equal to a set of parameters.
- public bool intersect (Rectangle src1, Rectangle src2)
Calculates the intersection of two rectangles.
- public bool is_empty ()
Check if a rectangle has zero area.
- public bool is_infinite_plane ()
Returns TRUE if the GeglRectangle represents an infininte plane, FALSE otherwise.
- public int subtract (Rectangle minuend, Rectangle subtrahend)
Subtracts
subtrahend
fromminuend
, and stores the resulting rectangles in this. - public bool subtract_bounding_box (Rectangle minuend, Rectangle subtrahend)
Computes the bounding box of the area formed by subtracting
subtrahend
fromminuend
, and stores the result in this. - public int xor (Rectangle source1, Rectangle source2)
Computes the symmetric difference of the rectangles
source1
andsource2
, and stores the resulting rectangles in this.