#include "config.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdarg.h>
#include "afterbase.h"
#include "asvisual.h"
#include "blender.h"
#include "asimage.h"
#include "imencdec.h"
#include "ximage.h"
#include "transform.h"
#include "pixmap.h"
Go to the source code of this file.
Defines | |
#define | CREATE_TRG_PIXMAP(asv, w, h) create_visual_pixmap(asv,RootWindow(asv->dpy,DefaultScreen(asv->dpy)),(w),(h),0) |
Functions | |
int | FillPixmapWithTile (Pixmap pixmap, Pixmap tile, int x, int y, int width, int height, int tile_x, int tile_y) |
Pixmap | GetRootPixmap (Atom id) |
static int | pixmap_error_handler (Display *dpy, XErrorEvent *error) |
Pixmap | ValidatePixmap (Pixmap p, int bSetHandler, int bTransparent, unsigned int *pWidth, unsigned int *pHeight) |
int | GetRootDimensions (int *width, int *height) |
int | GetWinPosition (Window w, int *x, int *y) |
ARGB32 | shading2tint32 (ShadingInfo *shading) |
Pixmap | scale_pixmap (ASVisual *asv, Pixmap src, int src_w, int src_h, int width, int height, GC gc, ARGB32 tint) |
Pixmap | ScalePixmap (Pixmap src, int src_w, int src_h, int width, int height, GC gc, ShadingInfo *shading) |
void | copyshade_drawable_area (ASVisual *asv, Drawable src, Pixmap trg, int x, int y, int w, int h, int trg_x, int trg_y, GC gc, ARGB32 tint) |
void | CopyAndShadeArea (Drawable src, Pixmap trg, int x, int y, int w, int h, int trg_x, int trg_y, GC gc, ShadingInfo *shading) |
void | tile_pixmap (ASVisual *asv, Pixmap src, Pixmap trg, int src_w, int src_h, int x, int y, int w, int h, GC gc, ARGB32 tint) |
void | ShadeTiledPixmap (Pixmap src, Pixmap trg, int src_w, int src_h, int x, int y, int w, int h, GC gc, ShadingInfo *shading) |
Pixmap | shade_pixmap (ASVisual *asv, Pixmap src, int x, int y, int width, int height, GC gc, ARGB32 tint) |
Pixmap | ShadePixmap (Pixmap src, int x, int y, int width, int height, GC gc, ShadingInfo *shading) |
Pixmap | center_pixmap (ASVisual *asv, Pixmap src, int src_w, int src_h, int width, int height, GC gc, ARGB32 tint) |
Pixmap | CenterPixmap (Pixmap src, int src_w, int src_h, int width, int height, GC gc, ShadingInfo *shading) |
Pixmap | grow_pixmap (ASVisual *asv, Pixmap src, int src_w, int src_h, int width, int height, GC gc, ARGB32 tint) |
Pixmap | GrowPixmap (Pixmap src, int src_w, int src_h, int width, int height, GC gc, ShadingInfo *shading) |
static Pixmap | cut_pixmap (ASVisual *asv, Pixmap src, Pixmap trg, int x, int y, unsigned int src_w, unsigned int src_h, unsigned int width, unsigned int height, GC gc, ARGB32 tint) |
static Pixmap | CutPixmap (Pixmap src, Pixmap trg, int x, int y, unsigned int src_w, unsigned int src_h, unsigned int width, unsigned int height, GC gc, ShadingInfo *shading) |
Pixmap | cut_win_pixmap (ASVisual *asv, Window win, Drawable src, int src_w, int src_h, int width, int height, GC gc, ARGB32 tint) |
Pixmap | CutWinPixmap (Window win, Drawable src, int src_w, int src_h, int width, int height, GC gc, ShadingInfo *shading) |
int | fill_with_darkened_background (ASVisual *asv, Pixmap *pixmap, ARGB32 tint, int x, int y, int width, int height, int root_x, int root_y, int bDiscardOriginal, ASImage *root_im) |
int | fill_with_pixmapped_background (ASVisual *asv, Pixmap *pixmap, ASImage *image, int x, int y, int width, int height, int root_x, int root_y, int bDiscardOriginal, ASImage *root_im) |
#define CREATE_TRG_PIXMAP | ( | asv, | |||
w, | |||||
h | ) | create_visual_pixmap(asv,RootWindow(asv->dpy,DefaultScreen(asv->dpy)),(w),(h),0) |
Definition at line 73 of file pixmap.c.
Referenced by center_pixmap(), cut_pixmap(), grow_pixmap(), shade_pixmap(), and ShadePixmap().
Pixmap center_pixmap | ( | ASVisual * | asv, | |
Pixmap | src, | |||
int | src_w, | |||
int | src_h, | |||
int | width, | |||
int | height, | |||
GC | gc, | |||
ARGB32 | tint | |||
) |
Definition at line 403 of file pixmap.c.
References copyshade_drawable_area(), CREATE_TRG_PIXMAP, Display(), ASVisual::dpy, get_default_asvisual(), h, MIN, None, w, x, and y.
Referenced by CenterPixmap().
Pixmap CenterPixmap | ( | Pixmap | src, | |
int | src_w, | |||
int | src_h, | |||
int | width, | |||
int | height, | |||
GC | gc, | |||
ShadingInfo * | shading | |||
) |
Definition at line 441 of file pixmap.c.
References center_pixmap(), get_default_asvisual(), None, and shading2tint32().
void CopyAndShadeArea | ( | Drawable | src, | |
Pixmap | trg, | |||
int | x, | |||
int | y, | |||
int | w, | |||
int | h, | |||
int | trg_x, | |||
int | trg_y, | |||
GC | gc, | |||
ShadingInfo * | shading | |||
) |
Definition at line 310 of file pixmap.c.
References copyshade_drawable_area(), Display(), ASVisual::dpy, get_default_asvisual(), shading2tint32(), and TINT_LEAVE_SAME.
void copyshade_drawable_area | ( | ASVisual * | asv, | |
Drawable | src, | |||
Pixmap | trg, | |||
int | x, | |||
int | y, | |||
int | w, | |||
int | h, | |||
int | trg_x, | |||
int | trg_y, | |||
GC | gc, | |||
ARGB32 | tint | |||
) |
Definition at line 277 of file pixmap.c.
References ASA_XImage, asimage2drawable(), ASIMAGE_QUALITY_DEFAULT, destroy_asimage(), Display(), ASVisual::dpy, get_default_asvisual(), NULL, pixmap2ximage(), tile_asimage(), TINT_LEAVE_SAME, and True.
Referenced by center_pixmap(), CopyAndShadeArea(), cut_pixmap(), grow_pixmap(), shade_pixmap(), ShadePixmap(), and tile_pixmap().
static Pixmap cut_pixmap | ( | ASVisual * | asv, | |
Pixmap | src, | |||
Pixmap | trg, | |||
int | x, | |||
int | y, | |||
unsigned int | src_w, | |||
unsigned int | src_h, | |||
unsigned int | width, | |||
unsigned int | height, | |||
GC | gc, | |||
ARGB32 | tint | |||
) | [static] |
Definition at line 492 of file pixmap.c.
References ASA_XImage, asimage2drawable(), ASIMAGE_QUALITY_DEFAULT, copyshade_drawable_area(), CREATE_TRG_PIXMAP, create_visual_window(), destroy_asimage(), Display(), ASVisual::dpy, dummy, False, FillPixmapWithTile(), get_default_asvisual(), h, MIN, None, NULL, offset_x, offset_y, pixmap2ximage(), root, start_ticker, tile_asimage(), tile_pixmap(), TINT_LEAVE_SAME, True, w, and wait_tick.
Referenced by cut_win_pixmap(), and CutPixmap().
Pixmap cut_win_pixmap | ( | ASVisual * | asv, | |
Window | win, | |||
Drawable | src, | |||
int | src_w, | |||
int | src_h, | |||
int | width, | |||
int | height, | |||
GC | gc, | |||
ARGB32 | tint | |||
) |
Definition at line 661 of file pixmap.c.
References cut_pixmap(), ASVisual::dpy, get_dpy_window_position(), None, NULL, x, and y.
static Pixmap CutPixmap | ( | Pixmap | src, | |
Pixmap | trg, | |||
int | x, | |||
int | y, | |||
unsigned int | src_w, | |||
unsigned int | src_h, | |||
unsigned int | width, | |||
unsigned int | height, | |||
GC | gc, | |||
ShadingInfo * | shading | |||
) | [static] |
Definition at line 646 of file pixmap.c.
References cut_pixmap(), get_default_asvisual(), None, and shading2tint32().
Referenced by CutWinPixmap().
Pixmap CutWinPixmap | ( | Window | win, | |
Drawable | src, | |||
int | src_w, | |||
int | src_h, | |||
int | width, | |||
int | height, | |||
GC | gc, | |||
ShadingInfo * | shading | |||
) |
Definition at line 673 of file pixmap.c.
References CutPixmap(), get_default_asvisual(), get_dpy_window_position(), None, NULL, x, and y.
int fill_with_darkened_background | ( | ASVisual * | asv, | |
Pixmap * | pixmap, | |||
ARGB32 | tint, | |||
int | x, | |||
int | y, | |||
int | width, | |||
int | height, | |||
int | root_x, | |||
int | root_y, | |||
int | bDiscardOriginal, | |||
ASImage * | root_im | |||
) |
Definition at line 686 of file pixmap.c.
References ASA_XImage, asimage2drawable(), ASIMAGE_QUALITY_DEFAULT, create_visual_pixmap(), destroy_asimage(), Display(), ASVisual::dpy, FillPixmapWithTile(), get_default_asvisual(), None, NULL, pixmap2ximage(), tile_asimage(), TINT_LEAVE_SAME, True, and ValidatePixmap().
int fill_with_pixmapped_background | ( | ASVisual * | asv, | |
Pixmap * | pixmap, | |||
ASImage * | image, | |||
int | x, | |||
int | y, | |||
int | width, | |||
int | height, | |||
int | root_x, | |||
int | root_y, | |||
int | bDiscardOriginal, | |||
ASImage * | root_im | |||
) |
Definition at line 737 of file pixmap.c.
References allanon_scanlines(), ASA_XImage, asimage2drawable(), ASIMAGE_QUALITY_DEFAULT, ASImageLayer::clip_height, ASImageLayer::clip_width, ASImageLayer::clip_x, ASImageLayer::clip_y, create_visual_pixmap(), destroy_asimage(), ASVisual::dpy, ASImageLayer::dst_x, ASImageLayer::dst_y, ASImageLayer::im, image, init_image_layers(), merge_layers(), ASImageLayer::merge_scanlines, None, NULL, pixmap2ximage(), True, and ValidatePixmap().
int FillPixmapWithTile | ( | Pixmap | pixmap, | |
Pixmap | tile, | |||
int | x, | |||
int | y, | |||
int | width, | |||
int | height, | |||
int | tile_x, | |||
int | tile_y | |||
) |
Definition at line 83 of file pixmap.c.
References Display(), ASVisual::dpy, get_default_asvisual(), and None.
Referenced by cut_pixmap(), and fill_with_darkened_background().
int GetRootDimensions | ( | int * | width, | |
int * | height | |||
) |
Definition at line 190 of file pixmap.c.
References Display(), ASVisual::dpy, and get_default_asvisual().
Pixmap GetRootPixmap | ( | Atom | id | ) |
Definition at line 106 of file pixmap.c.
References Display(), ASVisual::dpy, False, get_default_asvisual(), None, NULL, Success, True, and XA_PIXMAP.
Referenced by handle_asxml_tag_img(), and ValidatePixmap().
int GetWinPosition | ( | Window | w, | |
int * | x, | |||
int * | y | |||
) |
Definition at line 206 of file pixmap.c.
References get_default_asvisual(), get_dpy_window_position(), None, and NULL.
Pixmap grow_pixmap | ( | ASVisual * | asv, | |
Pixmap | src, | |||
int | src_w, | |||
int | src_h, | |||
int | width, | |||
int | height, | |||
GC | gc, | |||
ARGB32 | tint | |||
) |
Definition at line 453 of file pixmap.c.
References copyshade_drawable_area(), CREATE_TRG_PIXMAP, Display(), ASVisual::dpy, get_default_asvisual(), h, MIN, None, and w.
Referenced by GrowPixmap().
Pixmap GrowPixmap | ( | Pixmap | src, | |
int | src_w, | |||
int | src_h, | |||
int | width, | |||
int | height, | |||
GC | gc, | |||
ShadingInfo * | shading | |||
) |
Definition at line 477 of file pixmap.c.
References get_default_asvisual(), grow_pixmap(), None, and shading2tint32().
static int pixmap_error_handler | ( | Display * | dpy, | |
XErrorEvent * | error | |||
) | [static] |
Pixmap scale_pixmap | ( | ASVisual * | asv, | |
Pixmap | src, | |||
int | src_w, | |||
int | src_h, | |||
int | width, | |||
int | height, | |||
GC | gc, | |||
ARGB32 | tint | |||
) |
Definition at line 226 of file pixmap.c.
References ASA_ASImage, ASA_XImage, asimage2pixmap(), ASIMAGE_QUALITY_DEFAULT, destroy_asimage(), None, pixmap2ximage(), scale_asimage(), tile_asimage(), TINT_LEAVE_SAME, and True.
Referenced by ScalePixmap().
Pixmap ScalePixmap | ( | Pixmap | src, | |
int | src_w, | |||
int | src_h, | |||
int | width, | |||
int | height, | |||
GC | gc, | |||
ShadingInfo * | shading | |||
) |
Definition at line 266 of file pixmap.c.
References get_default_asvisual(), None, p, scale_pixmap(), and shading2tint32().
Pixmap shade_pixmap | ( | ASVisual * | asv, | |
Pixmap | src, | |||
int | x, | |||
int | y, | |||
int | width, | |||
int | height, | |||
GC | gc, | |||
ARGB32 | tint | |||
) |
Definition at line 372 of file pixmap.c.
References copyshade_drawable_area(), CREATE_TRG_PIXMAP, and None.
Pixmap ShadePixmap | ( | Pixmap | src, | |
int | x, | |||
int | y, | |||
int | width, | |||
int | height, | |||
GC | gc, | |||
ShadingInfo * | shading | |||
) |
Definition at line 387 of file pixmap.c.
References copyshade_drawable_area(), CREATE_TRG_PIXMAP, get_default_asvisual(), None, and shading2tint32().
void ShadeTiledPixmap | ( | Pixmap | src, | |
Pixmap | trg, | |||
int | src_w, | |||
int | src_h, | |||
int | x, | |||
int | y, | |||
int | w, | |||
int | h, | |||
GC | gc, | |||
ShadingInfo * | shading | |||
) |
Definition at line 363 of file pixmap.c.
References get_default_asvisual(), shading2tint32(), and tile_pixmap().
ARGB32 shading2tint32 | ( | ShadingInfo * | shading | ) |
Definition at line 212 of file pixmap.c.
References MAKE_ARGB32, NO_NEED_TO_SHADE, ShadingInfo::shading, TINT_LEAVE_SAME, and ShadingInfo::tintColor.
Referenced by CenterPixmap(), CopyAndShadeArea(), CutPixmap(), GrowPixmap(), ScalePixmap(), ShadePixmap(), and ShadeTiledPixmap().
void tile_pixmap | ( | ASVisual * | asv, | |
Pixmap | src, | |||
Pixmap | trg, | |||
int | src_w, | |||
int | src_h, | |||
int | x, | |||
int | y, | |||
int | w, | |||
int | h, | |||
GC | gc, | |||
ARGB32 | tint | |||
) |
Definition at line 333 of file pixmap.c.
References copyshade_drawable_area(), MIN, and tile_x.
Referenced by cut_pixmap(), and ShadeTiledPixmap().
Pixmap ValidatePixmap | ( | Pixmap | p, | |
int | bSetHandler, | |||
int | bTransparent, | |||
unsigned int * | pWidth, | |||
unsigned int * | pHeight | |||
) |
Definition at line 156 of file pixmap.c.
References Display(), ASVisual::dpy, get_default_asvisual(), GetRootPixmap(), int, None, NULL, pixmap_error_handler(), and root.
Referenced by fill_with_darkened_background(), and fill_with_pixmapped_background().