Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->Linux技术 ->系统管理 ->正文

GDK Reference Manual

来源:Linux-cn.com 作者:Webmaster 时间:2007-05-05 点击: [收藏] [投稿]


gdk_region_polygon ()
GdkRegion*gdk_region_polygon(GdkPoint *points,
gint npoints,GdkFillRule fill_rule); 

  Creates a new GdkRegion using the polygon defined by a number of points.

  points : an array of GdkPoint structs.

  npoints : the number of elements in the points array.

  fill_rule : specifies which pixels are included in the region when the polygon overlaps itself.

  Returns : a new GdkRegion based on the given polygon.

  enum GdkFillRule


typedef enum
{
GDK_EVEN_ODD_RULE,
GDK_WINDING_RULE
} GdkFillRule; 

  The method for determining which pixels are included in a region, when creating a GdkRegion from a polygon. The fill rule is only relevant for polygons which overlap themselves.

  GDK_EVEN_ODD_RULE areas which are overlapped an odd number of times are included in the region, while areas overlapped an even number of times are not.

  GDK_WINDING_RULE overlapping areas are always included.


gdk_region_destroy ()
voidgdk_region_destroy(GdkRegion *region); 

  Destroys a GdkRegion.

  region : a GdkRegion.


gdk_regions_intersect ()
GdkRegion*gdk_regions_intersect (GdkRegion *source1,GdkRegion *source2); 

  Returns the intersection of two regions.

  source1 : a GdkRegion.

  source2 : a GdkRegion.

  Returns : the intersection of source1 and source2.


gdk_regions_union ()
GdkRegion*gdk_regions_union (GdkRegion *source1,GdkRegion *source2); 

  Returns the union of two regions. This is all pixels in either of source1 or source2.

  source1 : a GdkRegion.

  source2 : a GdkRegion.

  Returns : the union of source1 and source2.


gdk_regions_subtract ()
GdkRegion*gdk_regions_subtract(GdkRegion *source1,GdkRegion *source2); 

  Subtracts one region from another. The result is a region containing all the pixels which are in source1, but which are not in source2.

  source1 : a GdkRegion.

  source2 : a GdkRegion to subtract from source1.

  Returns : source1 - source2.


gdk_regions_xor ()
GdkRegion*gdk_regions_xor (GdkRegion *source1,GdkRegion *source2); 

  Returns the difference between the union and the intersection of two regions. This is a region containing the pixels that are in one of the source regions, but which are not in both.

  source1 : a GdkRegion.

  source2 : a GdkRegion.

  Returns : the difference between the union and the intersection of source1 and source2.


gdk_region_union_with_rect ()
GdkRegion*gdk_region_union_with_rect(GdkRegion *region,GdkRectangle *rect); 

  Returns the union of a region and a rectangle.

  region : a GdkRegion.

  rect : a GdkRectangle.

  Returns : the union of region and rect.


gdk_region_offset ()
voidgdk_region_offset (GdkRegion *region,gint dx,gint dy); 

  Moves a region the specified distance.

  region : a GdkRegion.

  dx : the distance to move the region horizontally.

  dy : the distance to move the region vertically.


gdk_region_shrink ()
voidgdk_region_shrink (GdkRegion *region,gint dx,gint dy); 

  Resizes a region by the specified amount. Positive values shrink the region. Negative values expand it.

  region : a GdkRegion.

  dx : the number of pixels to shrink the region horizontally.

  dy : the number of pixels to shrink the region vertically.


gdk_region_empty ()
gbooleangdk_region_empty(GdkRegion *region); 


 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<



上一篇:GTK v1.2 Tutorial(英文)   下一篇:Java入门(12) 事件与错误处理

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
Power by linux-cn.com 粤ICP备05006655号