gdk.Rectangle.Rectangle Class Reference

List of all members.

Detailed Description

Description GDK provides the GdkPoint, GdkRectangle, GdkRegion and GdkSpan data types for representing pixels and sets of pixels on the screen.

GdkPoint is a simple structure containing an x and y coordinate of a point. GdkRectangle is a structure holding the position and size of a rectangle. The intersection of two rectangles can be computed with gdk_rectangle_intersect(). To find the union of two rectangles use gdk_rectangle_union(). GdkRegion is an opaque data type holding a set of arbitrary pixels, and is usually used for clipping graphical operations (see gdk_gc_set_clip_region()). GdkSpan is a structure holding a spanline. A spanline is a horizontal line that is one pixel wide. It is mainly used when rasterizing other graphics primitives. It can be intersected to regions by using gdk_region_spans_intersect_foreach().


Public Member Functions

GdkRectanglegetRectangleStruct ()
 this (GdkRectangle *gdkRectangle)
 Sets our main struct and passes it to the parent class.
int intersect (Rectangle src2, Rectangle dest)
 Calculates the intersection of two rectangles.
void unio (Rectangle src2, Rectangle dest)
 Calculates the union of two rectangles.

Protected Member Functions

void * getStruct ()
 the main Gtk struct as a void*

Protected Attributes

GdkRectanglegdkRectangle
 the main Gtk struct


Constructor & Destructor Documentation

gdk.Rectangle.Rectangle.this ( GdkRectangle gdkRectangle  ) 

Sets our main struct and passes it to the parent class.


Member Function Documentation

GdkRectangle* gdk.Rectangle.Rectangle.getRectangleStruct (  ) 

void* gdk.Rectangle.Rectangle.getStruct (  )  [protected]

the main Gtk struct as a void*

int gdk.Rectangle.Rectangle.intersect ( Rectangle  src2,
Rectangle  dest 
)

Calculates the intersection of two rectangles.

It is allowed for dest to be the same as either src1 or src2. src1: a GdkRectangle src2: a GdkRectangle dest: return location for the intersection of src1 and src2 Returns: TRUE if the rectangles intersect.

void gdk.Rectangle.Rectangle.unio ( Rectangle  src2,
Rectangle  dest 
)

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. src1: a GdkRectangle src2: a GdkRectangle dest: return location for the union of src1 and src2


Member Data Documentation

GdkRectangle* gdk.Rectangle.Rectangle.gdkRectangle [protected]

the main Gtk struct


SourceForge.net Logo DSource.org Logo digitalmars.com Logo