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

GDK Reference Manual

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

  Gets a pixel value at a specified position in a GdkImage.

  image : a GdkImage.

  x : the x coordinate of the pixel to get.

  y : the y coordinate of the pixel to get.

  Returns : the pixel value at the given position.

  See Also

  Bitmaps and Pixmaps

  Graphics which are stored on the X Windows server. Since these are stored on the server they can be drawn very quickly, and all of the Drawing Primitives can be used to draw on them. Their main disadvantage is that manipulating individual pixels can be very slow.

  GdkRGB

  Built on top of GdkImage, this provides much more functionality, including the dithering of colors to produce better output on low-color displays.

  Colormaps and Colors

  Name

  Colormaps and Colors -- manipulation of colors and colormaps.

  Synopsis


#include <gdk/gdk.h>
structGdkColor;
structGdkColormap;
GdkColormap* gdk_colormap_new (GdkVisual *visual,gint allocate);
GdkColormap* gdk_colormap_ref (GdkColormap *cmap);
voidgdk_colormap_unref(GdkColormap *cmap);
GdkColormap* gdk_colormap_get_system(void);
gintgdk_colormap_get_system_size(void);
voidgdk_colormap_change (GdkColormap *colormap,gint ncolors);
gintgdk_colormap_alloc_colors (GdkColormap *colormap,GdkColor *colors,
gint ncolors,gboolean writeable,gboolean best_match,gboolean *success);
gbooleangdk_colormap_alloc_color(GdkColormap *colormap,GdkColor *color,
gboolean writeable,gboolean best_match);
voidgdk_colormap_free_colors(GdkColormap *colormap,
GdkColor *colors,gint ncolors);
GdkVisual*gdk_colormap_get_visual (GdkColormap *colormap);
voidgdk_colors_store(GdkColormap *colormap,GdkColor *colors,gint ncolors);
GdkColor* gdk_color_copy(GdkColor *color);
voidgdk_color_free(GdkColor *color);
gbooleangdk_colors_alloc(GdkColormap *colormap,
gint contiguous,gulong *planes,gint nplanes,gulong *pixels,gint npixels);
voidgdk_colors_free (GdkColormap *colormap,
gulong *pixels,gint npixels,gulong planes);
gbooleangdk_color_white (GdkColormap *colormap,GdkColor *color);
gbooleangdk_color_black (GdkColormap *colormap,GdkColor *color);
gbooleangdk_color_parse (const gchar *spec,GdkColor *color);
gbooleangdk_color_alloc (GdkColormap *colormap,GdkColor *color);
gbooleangdk_color_change(GdkColormap *colormap,GdkColor *color);
gintgdk_color_equal (const GdkColor *colora,const GdkColor *colorb);
guint gdk_color_hash(const GdkColor *colora,const GdkColor *colorb); 

  Description

  These functions are used to modify colormaps. A colormap is an object that contains the mapping between the color values stored in memory and the RGB values that are used to display color values. In general, colormaps only contain significant information for pseudo-color visuals, but even for other visual types, a colormap object is required in some circumstances.

  There are a couple of special colormaps that can be retrieved. The system colormap (retrieved with gdk_colormap_get_system()) is the default colormap of the system. If you are using GdkRGB, there is another colormap that is important - the colormap in which GdkRGB works, retrieved with gdk_rgb_get_cmap(). However, when using GdkRGB, it is not generally necessary to allocate colors directly.

  In previous revisions of this interface, a number of functions that take a GdkColormap parameter were replaced with functions whose names began with "gdk_colormap_". This process will probably be extended somewhat in the future - gdk_color_white(), gdk_color_black(), and gdk_color_change() will probably become aliases.

  Details

  struct GdkColor


struct GdkColor
{
gulongpixel;
gushort red;
gushort green;
gushort blue;
}; 

  The GdkColor structure is used to describe an allocated or unallocated color.

  pixel For allocated colors, the value used to draw this color on the screen.

  red The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.

  green the blue component of the color.

  blue the green component of the color..

  struct GdkColormap


struct GdkColormap
{
gintsize;
GdkColor *colors;
}; 

  The colormap structure contains the following public fields.

  size For pseudo-color colormaps, the number of colors in the colormap..

  colors An array containing the current values in the colormap. This can be used to map from pixel values back to RGB values. This is only meaningful for pseudo-color colormaps.

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

上一页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2021 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 下一页


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

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
·Motorola微处理器bootloader分析与应用
·Fedora Core5 NFS服务器搭建过程介绍
·Linux系统:让内存不再泄漏的实用技巧
·新手看招 手把手教你安装VMware虚拟机
·“侵权事件” 红帽称微软企图干扰用户
·删除Linux后 如何找回Windows启动菜单
·菜鸟乐园 Linux中常见文件系统格式介绍
·Linux操作系统下IPTables配置方法详解
·实用技巧 Linux系统的经典使用技巧八则
·Linux系统文件优化及磁盘检查方法介绍
推荐文章
·什么时候应该使用Web Service
·如何监视某个tty?
·出错也不怕—Linux系统紧急情况处理
·Linux 指令篇:档案目录管理--ls
·开放源代码时代即将到来
·用PHP+MySQL构建一个招聘网站(10)
·理解和使用Oracle 8i分析工具-LogM
·JSP的环境引擎--websphere
精彩文章
·xfs文件系统(原创)
·Linux 指令篇:工作行程资讯与管理--
·用户界面原型开发:技巧和技术
·PHP的XML分析函数(一)
·编写Linux实用程序的艺术
·基于heartbeat的NFS HA实现
·如何阅读源代码
·一个网上理财站点的设计(二)
·Linux 指令篇:起始管理--reboot
·LInux 应用程序如何处理当前运行环
·mount使用指南
·用php生成excel文件
·Linux 常用命令(磁盘管理)
·架设 DHCP Server
·简易防火墙建置与流量统计
·J2EE概述
·[术语]GPL通用公共许可证
·内核空间SMP编程
·认识X-Window窗口管理器
·Linux内核网络参数的意义及应用
·Linux下硬盘分区的最佳方案
·JavaBean使用技巧
·基于DNS的多机均衡负载的实现
·python入门1
·Linux 网管 123 --- 第10章. 升级 L
·Oracle安装(linux)小结
Power by linux-cn.com 粤ICP备05006655号