2 /* Copyright (C) 2002 Olivier Chapuis */
4 #ifndef F_PICTURE_GRAPHICS_H
5 #define F_PICTURE_GRAPHICS_H
9 * dpy: Specifies the connection to the X server.
10 * pixmap: Source pixmap.
11 * mask: Source mask (can be None).
12 * alpha: Source alpha chanel (can be None).
13 * depth: depth of the pixmap (1 or Pdepth).
14 * d: Destination drawable which should be of depth Pdepth.
15 * GC gc: Specifies the a visual GC.
16 * src_x,src_y: Specify the x and y coordinates, which are relative to the
17 * origin of the source pixmap, mask and alpha of the rectangle
19 * src_w,src_h: Width and height of the source rectangle relatively to the
21 * dest_x,dest_y: Specify the x and y coordinates of the destination rectangle,
22 * which are relative to the origin of the drawable d.
26 /* return a pixmap of depth depth which is the copy of the src pixmap of depth
27 * 1 using the gc for the bg and fg colors */
28 Pixmap
PictureBitmapToPixmap(
29 Display
*dpy
, Window win
, Pixmap src
, int depth
, GC gc
,
30 int src_x
, int src_y
, int src_w
, int src_h
);
33 * <pubfunc>PGraphicsRenderPixmaps
35 * PGraphicsRenderPixmaps copies a rectangle, the src, constituted by a pixmap
36 * with its mask, alpha channel, and rendering attributes to a drawable at a
40 void PGraphicsRenderPixmaps(
41 Display
*dpy
, Window win
, Pixmap pixmap
, Pixmap mask
, Pixmap alpha
,
42 int depth
, FvwmRenderAttributes
*fra
, Drawable d
,
43 GC gc
, GC mono_gc
, GC alpha_gc
,
44 int src_x
, int src_y
, int src_w
, int src_h
,
45 int dest_x
, int dest_y
, int dest_w
, int dest_h
, int do_repeat
);
48 * <pubfunc>PGraphicsRenderPicture
50 * PGraphicsRenderPicture copies a rectangle, the src, constituted by a picture
51 * and its rendering attributes to a drawable at a given position.
55 void PGraphicsRenderPicture(
56 Display
*dpy
, Window win
, FvwmPicture
*p
, FvwmRenderAttributes
*fra
,
57 Drawable d
, GC gc
, GC mono_gc
, GC alpha_gc
,
58 int src_x
, int src_y
, int src_w
, int src_h
,
59 int dest_x
, int dest_y
, int dest_w
, int dest_h
, int do_repeat
);
62 * <pubfunc>PGraphicsCopyPixmaps
64 * PGraphicsCopyPixmaps copies a rectangle constituted by a pixmap with its
65 * mask and alpha channel to a drawable at a given position.
68 * The clip_mask, clip_x_origin and clip_y_origin value of the gc are
69 * modified in this function: the clip_mask is set to mask and reseted to None,
70 * clip_x_origin and clip_y_origin are set to src_x and src_y.
71 * The background and foreground value of the gc is important when you render
72 * a bitmap. If the gc is set to None the function create and destroy a gc for
76 void PGraphicsCopyPixmaps(
77 Display
*dpy
, Pixmap pixmap
, Pixmap mask
, Pixmap alpha
, int depth
,
78 Drawable d
, GC gc
, int src_x
, int src_y
, int src_w
, int src_h
,
79 int dest_x
, int dest_y
);
82 * <pubfunc>PGraphicsCopyFvwmPicture
84 * PGraphicsCopyFvwmPicture copies a rectangle constituted by an FvwmPicture
85 * to a drawable at a given position. It is similar to PGraphicsCopyPixmaps
86 * and the same remarks are valids. The only difference is that the source
87 * rectangle is given by the FvwmPicture p (which contains the pixmap, the
88 * mask, the alpha and the depth).
91 void PGraphicsCopyFvwmPicture(
92 Display
*dpy
, FvwmPicture
*p
, Drawable d
, GC gc
, int src_x
, int src_y
,
93 int src_w
, int src_h
, int dest_x
, int dest_y
);
96 * <pubfunc>PGraphicsTileRectangle
98 * This function is similar to PGraphicsCopyPixmaps. It tiles the rectangle of
99 * the drawable d defined with coordinates dest_x, dest_y, dest_w, dest_h with
100 * the rectangle composed by the pixmap, its mask and its alpha channel.
103 void PGraphicsTileRectangle(
104 Display
*dpy
, Window win
, Pixmap pixmap
, Pixmap shape
, Pixmap alpha
,
105 int depth
, Drawable d
, GC gc
, GC mono_gc
,
106 int src_x
, int src_y
, int src_w
, int src_h
,
107 int dest_x
, int dest_y
, int dest_w
, int dest_h
);
109 FvwmPicture
*PGraphicsCreateStretchPicture(
110 Display
*dpy
, Window win
, FvwmPicture
*src
,
111 int dest_width
, int dest_height
, GC gc
, GC mono_gc
, GC alpha_gc
);
113 FvwmPicture
*PGraphicsCreateTiledPicture(
114 Display
*dpy
, Window win
, FvwmPicture
*src
,
115 int dest_width
, int dest_height
, GC gc
, GC mono_gc
, GC alpha_gc
);
117 Pixmap
PGraphicsCreateTransparency(
118 Display
*dpy
, Window win
, FvwmRenderAttributes
*fra
, GC gc
,
119 int x
, int y
, int width
, int height
, Bool parent_relative
);
121 void PGraphicsTintRectangle(
122 Display
*dpy
, Window win
, Pixel tint
, int tint_percent
,
123 Drawable dest
, Bool dest_is_a_window
, GC gc
, GC mono_gc
, GC alpha_gc
,
124 int dest_x
, int dest_y
, int dest_w
, int dest_h
);
127 Pixmap
PGraphicsCreateDitherPixmap(
128 Display
*dpy
, Window win
, Drawable src
, Pixmap mask
, int depth
, GC gc
,
129 int in_width
, int in_height
, int out_width
, int out_height
);