1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
|
/* -*-c-*- */
/* Copyright (C) 2002 Olivier Chapuis */
#ifndef FVWMLIB_PICTURE_GRAPHICS_H
#define FVWMLIB_PICTURE_GRAPHICS_H
#include "fvwm_x11.h"
#include "PictureBase.h"
/*
* <generalArgs>
* dpy: Specifies the connection to the X server.
* pixmap: Source pixmap.
* mask: Source mask (can be None).
* alpha: Source alpha chanel (can be None).
* depth: depth of the pixmap (1 or Pdepth).
* d: Destination drawable which should be of depth Pdepth.
* GC gc: Specifies the a visual GC.
* src_x,src_y: Specify the x and y coordinates, which are relative to the
* origin of the source pixmap, mask and alpha of the rectangle
* which is copied.
* src_w,src_h: Width and height of the source rectangle relatively to the
* src_x and src_y.
* dest_x,dest_y: Specify the x and y coordinates of the destination rectangle,
* which are relative to the origin of the drawable d.
* </generalArgs>
*/
/* return a pixmap of depth depth which is the copy of the src pixmap of depth
* 1 using the gc for the bg and fg colors */
Pixmap PictureBitmapToPixmap(
Display *dpy, Window win, Pixmap src, int depth, GC gc,
int src_x, int src_y, int src_w, int src_h);
/*
* <pubfunc>PGraphicsRenderPixmaps
* <description>
* PGraphicsRenderPixmaps copies a rectangle, the src, constituted by a pixmap
* with its mask, alpha channel, and rendering attributes to a drawable at a
* given position.
* </description>
*/
void PGraphicsRenderPixmaps(
Display *dpy, Window win, Pixmap pixmap, Pixmap mask, Pixmap alpha,
int depth, FvwmRenderAttributes *fra, Drawable d,
GC gc, GC mono_gc, GC alpha_gc,
int src_x, int src_y, int src_w, int src_h,
int dest_x, int dest_y, int dest_w, int dest_h, int do_repeat);
/*
* <pubfunc>PGraphicsRenderPicture
* <description>
* PGraphicsRenderPicture copies a rectangle, the src, constituted by a picture
* and its rendering attributes to a drawable at a given position.
* </description>
* <arg>
*/
void PGraphicsRenderPicture(
Display *dpy, Window win, FvwmPicture *p, FvwmRenderAttributes *fra,
Drawable d, GC gc, GC mono_gc, GC alpha_gc,
int src_x, int src_y, int src_w, int src_h,
int dest_x, int dest_y, int dest_w, int dest_h, int do_repeat);
/*
* <pubfunc>PGraphicsCopyPixmaps
* <description>
* PGraphicsCopyPixmaps copies a rectangle constituted by a pixmap with its
* mask and alpha channel to a drawable at a given position.
* </description>
* <note>
* The clip_mask, clip_x_origin and clip_y_origin value of the gc are
* modified in this function: the clip_mask is set to mask and reseted to None,
* clip_x_origin and clip_y_origin are set to src_x and src_y.
* The background and foreground value of the gc is important when you render
* a bitmap. If the gc is set to None the function create and destroy a gc for
* its use.
* </note>
*/
void PGraphicsCopyPixmaps(
Display *dpy, Pixmap pixmap, Pixmap mask, Pixmap alpha, int depth,
Drawable d, GC gc, int src_x, int src_y, int src_w, int src_h,
int dest_x, int dest_y);
/*
* <pubfunc>PGraphicsCopyFvwmPicture
* <description>
* PGraphicsCopyFvwmPicture copies a rectangle constituted by an FvwmPicture
* to a drawable at a given position. It is similar to PGraphicsCopyPixmaps
* and the same remarks are valids. The only difference is that the source
* rectangle is given by the FvwmPicture p (which contains the pixmap, the
* mask, the alpha and the depth).
* </description>
*/
void PGraphicsCopyFvwmPicture(
Display *dpy, FvwmPicture *p, Drawable d, GC gc, int src_x, int src_y,
int src_w, int src_h, int dest_x, int dest_y);
/*
* <pubfunc>PGraphicsTileRectangle
* <description>
* This function is similar to PGraphicsCopyPixmaps. It tiles the rectangle of
* the drawable d defined with coordinates dest_x, dest_y, dest_w, dest_h with
* the rectangle composed by the pixmap, its mask and its alpha channel.
* </description>
*/
void PGraphicsTileRectangle(
Display *dpy, Window win, Pixmap pixmap, Pixmap shape, Pixmap alpha,
int depth, Drawable d, GC gc, GC mono_gc,
int src_x, int src_y, int src_w, int src_h,
int dest_x, int dest_y, int dest_w, int dest_h);
FvwmPicture *PGraphicsCreateStretchPicture(
Display *dpy, Window win, FvwmPicture *src,
int dest_width, int dest_height, GC gc, GC mono_gc, GC alpha_gc);
FvwmPicture *PGraphicsCreateTiledPicture(
Display *dpy, Window win, FvwmPicture *src,
int dest_width, int dest_height, GC gc, GC mono_gc, GC alpha_gc);
Pixmap PGraphicsCreateTransparency(
Display *dpy, Window win, FvwmRenderAttributes *fra, GC gc,
int x, int y, int width, int height, Bool parent_relative);
void PGraphicsTintRectangle(
Display *dpy, Window win, Pixel tint, int tint_percent,
Drawable dest, Bool dest_is_a_window, GC gc, GC mono_gc, GC alpha_gc,
int dest_x, int dest_y, int dest_w, int dest_h);
Pixmap PGraphicsCreateTranslucent(
Display *dpy, Window win, FvwmRenderAttributes *fra, GC gc,
int x, int y, int width, int height);
/* never used ! */
Pixmap PGraphicsCreateDitherPixmap(
Display *dpy, Window win, Drawable src, Pixmap mask, int depth, GC gc,
int in_width, int in_height, int out_width, int out_height);
#endif
|