]> Pileus Git - ~andy/gtk/blob - docs/reference/gdk/tmpl/pixmaps.sgml
d64418f7a5faa1d500eb8ba10acfdd4fef4be040
[~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
81
82 @drawable: 
83 @mask: 
84 @transparent_color: 
85 @filename: 
86 @Returns: 
87
88
89 <!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm ##### -->
90
91
92 @drawable: 
93 @colormap: 
94 @mask: 
95 @transparent_color: 
96 @filename: 
97 @Returns: 
98
99
100 <!-- ##### FUNCTION gdk_pixmap_create_from_xpm_d ##### -->
101
102
103 @drawable: 
104 @mask: 
105 @transparent_color: 
106 @data: 
107 @Returns: 
108
109
110 <!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm_d ##### -->
111
112
113 @drawable: 
114 @colormap: 
115 @mask: 
116 @transparent_color: 
117 @data: 
118 @Returns: 
119
120
121 <!-- ##### TYPEDEF GdkBitmap ##### -->
122 <para>
123 An opaque structure representing an offscreen drawable of depth
124 1. Pointers to structures of type #GdkPixmap, #GdkBitmap, and
125 #GdkWindow, can often be used interchangeably.  The type #GdkDrawable
126 refers generically to any of these types.
127 </para>