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

GDK Reference Manual

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

  gc : a GdkGC.

  Returns : gc.


gdk_gc_unref ()
voidgdk_gc_unref(GdkGC *gc); 

  Decrease the reference count on a graphics context. If the resulting reference count is zero, the graphics context will be destroyed.

  gc : a GdkGC.


gdk_gc_destroy ()
voidgdk_gc_destroy(GdkGC *gc); 

  Identical to gdk_gc_unref(). This function is obsolete and should not be used.

  gc : a GdkGC.


gdk_gc_get_values ()
voidgdk_gc_get_values (GdkGC *gc,GdkGCValues *values); 

  Retrieves the current values from a graphics context.

  gc : a GdkGC.

  values : the GdkGCValues structure in which to store the results.


gdk_gc_set_foreground ()
voidgdk_gc_set_foreground (GdkGC *gc,GdkColor *color); 

  Sets the foreground color for a graphics context.

  gc : a GdkGC.

  color : the new foreground color.


gdk_gc_set_background ()
voidgdk_gc_set_background (GdkGC *gc,GdkColor *color); 

  Sets the background color for a graphics context.

  gc : a GdkGC.

  color : the new background color.


gdk_gc_set_font ()
voidgdk_gc_set_font (GdkGC *gc,GdkFont *font); 

  Sets the font for a graphics context. (Note that all text-drawing functions in GDK take a font argument; the value set here is used when that argument is NULL.)

  gc : a GdkGC.

  font : the new font.


gdk_gc_set_function ()
voidgdk_gc_set_function (GdkGC *gc,GdkFunction function); 

  Determines how the current pixel values and the pixel values being drawn are combined to produce the final pixel values.

  gc : a GdkGC.

  function :


gdk_gc_set_fill ()
voidgdk_gc_set_fill (GdkGC *gc,GdkFill fill); 

  Set the fill mode for a graphics context.

  gc : a GdkGC.

  fill : the new fill mode.

  enum GdkFill


typedef enum
{
GDK_SOLID,
GDK_TILED,
GDK_STIPPLED,
GDK_OPAQUE_STIPPLED
} GdkFill; 

  Determines how primitives are drawn.

  GDK_SOLID draw with the foreground color.

  GDK_TILED draw with a tiled pixmap.

  GDK_STIPPLED draw using the stipple bitmap. Pixels corresponding to bits in the stipple bitmap that are set will be drawn in the foreground color; pixels corresponding to bits that are not set will be left untouched.

  GDK_OPAQUE_STIPPLED draw using the stipple bitmap. Pixels corresponding to bits in the stipple bitmap that are set will be drawn in the foreground color; pixels corresponding to bits that are not set will be drawn with the background color.


gdk_gc_set_tile ()
voidgdk_gc_set_tile (GdkGC *gc,GdkPixmap *tile); 

  Set a tile pixmap for a graphics context. This will only be used if the fill mode is GDK_TILED.

  gc : a GdkGC.

  tile : the new tile pixmap.


gdk_gc_set_stipple ()
voidgdk_gc_set_stipple(GdkGC *gc,GdkPixmap *stipple); 

  Set the stipple bitmap for a graphics context. The stipple will only be used if the fill mode is GDK_STIPPLED or GDK_OPAQUE_STIPPLED.

  gc : a GdkGC.

  stipple : the new stipple bitmap.


gdk_gc_set_ts_origin ()
voidgdk_gc_set_ts_origin(GdkGC *gc,gint x,gint y); 

  Set the origin when using tiles or stipples with the GC. The tile or stipple will be aligned such that the upper left corner of the tile or stipple will coincide with this point.

  gc : a GdkGC.

  x : the x-coordinate of the origin.

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



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

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