]> Pileus Git - ~andy/gtk/blob - docs/reference/gdk/tmpl/pixmaps.sgml
5ea7f8aac8d8c9b511c4f510e4f41b656de6d1de
[~andy/gtk] / docs / reference / gdk / tmpl / pixmaps.sgml
1 <!-- ##### SECTION Title ##### -->
2 Bitmaps and Pixmaps
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Offscreen drawables
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 Pixmaps are offscreen drawables. They can be drawn upon with the
10 standard drawing primitives, then copied to another drawable (such as
11 a #GdkWindow) with gdk_pixmap_draw(). The depth of a pixmap
12 is the number of bits per pixels. Bitmaps are simply pixmaps
13 with a depth of 1. (That is, they are monochrome bitmaps - each
14 pixel can be either on or off).
15 </para>
16
17 <!-- ##### SECTION See_Also ##### -->
18 <para>
19 </para>
20
21 <!-- ##### SECTION Stability_Level ##### -->
22
23
24 <!-- ##### STRUCT GdkPixmap ##### -->
25 <para>
26 An opaque structure representing an offscreen drawable.
27 Pointers to structures of type #GdkPixmap, #GdkBitmap,
28 and #GdkWindow, can often be used interchangeably. 
29 The type #GdkDrawable refers generically to any of
30 these types.
31 </para>
32
33
34 <!-- ##### FUNCTION gdk_pixmap_new ##### -->
35 <para>
36 Create a new pixmap with a given size and depth.
37 </para>
38
39 @drawable: A #GdkDrawable, used to determine default values
40 for the new pixmap. Can be %NULL if @depth is specified,
41 @width: The width of the new pixmap in pixels.
42 @height: The height of the new pixmap in pixels.
43 @depth: The depth (number of bits per pixel) of the new pixmap. 
44   If -1, and @drawable is not %NULL, the depth of the new
45   pixmap will be equal to that of @drawable.
46 @Returns: the #GdkPixmap
47
48
49 <!-- ##### FUNCTION gdk_bitmap_create_from_data ##### -->
50 <para>
51 Creates a new bitmap from data in XBM format.
52 </para>
53
54 @drawable: a #GdkDrawable, used to determine default values
55 for the new pixmap. Can be %NULL, in which case the root
56 window is used.
57 @data: a pointer to the XBM data.
58 @width: the width of the new pixmap in pixels.
59 @height: the height of the new pixmap in pixels.
60 @Returns: the #GdkBitmap
61
62
63 <!-- ##### FUNCTION gdk_pixmap_create_from_data ##### -->
64 <para>
65 Create a two-color pixmap from data in XBM data.
66 </para>
67
68 @drawable: a #GdkDrawable, used to determine default values
69 for the new pixmap. Can be %NULL, if the depth is given.
70 @data: a pointer to the data.
71 @width: the width of the new pixmap in pixels.
72 @height: the height of the new pixmap in pixels.
73 @depth: the depth (number of bits per pixel) of the new pixmap.
74 @fg: the foreground color.
75 @bg: the background color.
76 @Returns: the #GdkPixmap
77
78
79 <!-- ##### FUNCTION gdk_pixmap_create_from_xpm ##### -->
80 <para>
81 Create a pixmap from a XPM file.
82 </para>
83
84 @drawable: a #GdkDrawable, used to determine default values
85 for the new pixmap.
86 @mask: a pointer to a place to store a bitmap representing
87 the transparency mask of the XPM file. Can be %NULL,
88 in which case transparency will be ignored.
89 @transparent_color: the color to be used for the pixels
90 that are transparent in the input file. Can be %NULL,
91 in which case a default color will be used.
92 @filename: the filename of a file containing XPM data.
93 @Returns: the #GdkPixmap
94
95
96 <!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm ##### -->
97 <para>
98 Create a pixmap from a XPM file using a particular colormap.
99 </para>
100
101 @drawable: a #GdkDrawable, used to determine default values
102 for the new pixmap. Can be %NULL if @colormap is given.
103 @colormap: the #GdkColormap that the new pixmap will be use.
104   If omitted, the colormap for @window will be used.
105 @mask: a pointer to a place to store a bitmap representing
106 the transparency mask of the XPM file. Can be %NULL,
107 in which case transparency will be ignored.
108 @transparent_color: the color to be used for the pixels
109 that are transparent in the input file. Can be %NULL,
110 in which case a default color will be used.
111 @filename: the filename of a file containing XPM data.
112 @Returns: the #GdkPixmap.
113
114
115 <!-- ##### FUNCTION gdk_pixmap_create_from_xpm_d ##### -->
116 <para>
117 Create a pixmap from data in XPM format.
118 </para>
119
120 @drawable: a #GdkDrawable, used to determine default values
121 for the new pixmap.
122 @mask: Pointer to a place to store a bitmap representing
123 the transparency mask of the XPM file. Can be %NULL,
124 in which case transparency will be ignored.
125 @transparent_color: This color will be used for the pixels
126 that are transparent in the input file. Can be %NULL
127 in which case a default color will be used.
128 @data: Pointer to a string containing the XPM data.
129 @Returns: the #GdkPixmap
130
131
132 <!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm_d ##### -->
133 <para>
134 Create a pixmap from data in XPM format using a particular
135 colormap.
136 </para>
137
138 @drawable: a #GdkDrawable, used to determine default values
139 for the new pixmap. Can be %NULL if @colormap is given.
140 @colormap: the #GdkColormap that the new pixmap will be use.
141   If omitted, the colormap for @window will be used.
142 @mask: a pointer to a place to store a bitmap representing
143 the transparency mask of the XPM file. Can be %NULL,
144 in which case transparency will be ignored.
145 @transparent_color: the color to be used for the pixels
146 that are transparent in the input file. Can be %NULL,
147 in which case a default color will be used.
148 @data: Pointer to a string containing the XPM data.
149 @Returns: the #GdkPixmap.
150
151
152 <!-- ##### MACRO gdk_pixmap_ref ##### -->
153 <para>
154 Deprecated equivalent of g_object_ref().
155 </para>
156
157 @Returns: @pixmap
158
159
160 <!-- ##### MACRO gdk_pixmap_unref ##### -->
161 <para>
162 Deprecated equivalent of g_object_unref().
163 </para>
164
165
166
167 <!-- ##### STRUCT GdkBitmap ##### -->
168 <para>
169 An opaque structure representing an offscreen drawable of depth
170 1. Pointers to structures of type #GdkPixmap, #GdkBitmap, and
171 #GdkWindow, can often be used interchangeably.  The type #GdkDrawable
172 refers generically to any of these types.
173 </para>
174
175 @user_data: 
176
177 <!-- ##### MACRO gdk_bitmap_ref ##### -->
178 <para>
179 Deprecated equivalent of g_object_ref().
180 </para>
181
182 @Returns: @pixmap
183
184
185 <!-- ##### MACRO gdk_bitmap_unref ##### -->
186 <para>
187 Deprecated equivalent of g_object_unref().
188 </para>
189
190
191