GDK Reference ManualReturns : the X error code, or 0 if no error occurred. Points, Rectangles and Regions Name Points, Rectangles and Regions -- simple graphical data types. Synopsis
Description GDK provides the GdkPoint, GdkRectangle and GdkRegion 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()). Details struct GdkPoint
Defines the x and y coordinates of a point. Note that both are defined as gint16 values, so the coordinates are limited to between -32,768 and 32,767. gint16 x the x coordinate of the point. gint16 y the y coordinate of the point. struct GdkRectangle
Defines the position and size of a rectangle. gint16 x the x coordinate of the left edge of the rectangle. gint16 y the y coordinate of the top of the rectangle. guint16 width the width of the rectangle. guint16 height the height of the rectangle.
Calculates the intersection of two rectangles. src1 : a GdkRectangle. src2 : a GdkRectangle. dest : the intersection of src1 and src2. Returns : TRUE if the rectangles intersect.
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. src1 : a GdkRectangle. src2 : a GdkRectangle. dest : the union of src1 and src2. struct GdkRegion
A GdkRegion represents a set of pixels on the screen. The only user-visible field of the structure is the user_data member, which can be used to attach arbitrary data to the GdkRegion. gpointer user_data arbitrary data attached to the GdkRegion.
Creates a new empty GdkRegion. Returns : a new empty GdkRegion. 上一篇:GTK v1.2 Tutorial(英文) 下一篇:Java入门(12) 事件与错误处理 更多相关文章
|
推荐文章
精彩文章
|