… | |
… | |
52 | * adjustment and may optionally be followed by a colon and one or more |
52 | * adjustment and may optionally be followed by a colon and one or more |
53 | * colon-delimited pixmap operations. |
53 | * colon-delimited pixmap operations. |
54 | * The following table shows the valid geometry strings and their |
54 | * The following table shows the valid geometry strings and their |
55 | * effects on the background image : |
55 | * effects on the background image : |
56 | * |
56 | * |
57 | * WxH+X+Y Set scaling to W% by H%, and position to X% by Y%. |
57 | * WxH+X+Y Set scaling to W% by H%, and position to X% by Y%. |
58 | * W and H are percentages of the terminal window size. |
58 | * W and H are percentages of the terminal window size. |
59 | * X and Y are also percentages; e.g., +50+50 centers |
59 | * X and Y are also percentages; e.g., +50+50 centers |
60 | * the image in the window. |
60 | * the image in the window. |
61 | * WxH+X Assumes Y == X |
61 | * WxH+X Assumes Y == X |
62 | * WxH Assumes Y == X == 50 (centers the image) |
62 | * WxH Assumes Y == X == 50 (centers the image) |
63 | * W+X+Y Assumes H == W |
63 | * W+X+Y Assumes H == W |
64 | * W+X Assumes H == W and Y == X |
64 | * W+X Assumes H == W and Y == X |
65 | * W Assumes H == W and Y == X == 50 |
65 | * W Assumes H == W and Y == X == 50 |
66 | * |
66 | * |
67 | * Adjusting position only : |
67 | * Adjusting position only : |
68 | * =+X+Y Set position to X% by Y% (absolute). |
68 | * =+X+Y Set position to X% by Y% (absolute). |
69 | * =+X Set position to X% by X%. |
69 | * =+X Set position to X% by X%. |
70 | * +X+Y Adjust position horizontally X% and vertically Y% |
70 | * +X+Y Adjust position horizontally X% and vertically Y% |
71 | * from current position (relative). |
71 | * from current position (relative). |
72 | * +X Adjust position horizontally X% and vertically X% |
72 | * +X Adjust position horizontally X% and vertically X% |
73 | * from current position. |
73 | * from current position. |
74 | * |
74 | * |
75 | * Adjusting scale only : |
75 | * Adjusting scale only : |
76 | * Wx0 Multiply horizontal scaling factor by W% |
76 | * Wx0 Multiply horizontal scaling factor by W% |
77 | * 0xH Multiply vertical scaling factor by H% |
77 | * 0xH Multiply vertical scaling factor by H% |
78 | * 0x0 No scaling (show image at normal size). |
78 | * 0x0 No scaling (show image at normal size). |
79 | * |
79 | * |
80 | * Pixmap Operations : (should be prepended by a colon) |
80 | * Pixmap Operations : (should be prepended by a colon) |
81 | * tile Tile image. Scaling/position modifiers above will affect |
81 | * tile Tile image. Scaling/position modifiers above will affect |
82 | * the tile size and origin. |
82 | * the tile size and origin. |
83 | * propscale When scaling, scale proportionally. That is, maintain the |
83 | * propscale When scaling, scale proportionally. That is, maintain the |
84 | * proper aspect ratio for the image. Any portion of the |
84 | * proper aspect ratio for the image. Any portion of the |
85 | * background not covered by the image is filled with the |
85 | * background not covered by the image is filled with the |
86 | * current background color. |
86 | * current background color. |
87 | * hscale Scale horizontally, tile vertically ? |
87 | * hscale Scale horizontally, tile vertically ? |
88 | * vscale Tile horizontally, scale vertically ? |
88 | * vscale Tile horizontally, scale vertically ? |
… | |
… | |
1189 | XImage *result = NULL; |
1189 | XImage *result = NULL; |
1190 | |
1190 | |
1191 | if (background_flags && (flags & isInvalid)) |
1191 | if (background_flags && (flags & isInvalid)) |
1192 | { |
1192 | { |
1193 | result = XGetImage (target->dpy, pixmap, 0, 0, pmap_width, pmap_height, AllPlanes, ZPixmap); |
1193 | result = XGetImage (target->dpy, pixmap, 0, 0, pmap_width, pmap_height, AllPlanes, ZPixmap); |
|
|
1194 | } |
1194 | |
1195 | |
|
|
1196 | if (result) |
|
|
1197 | { |
1195 | # if !defined(HAVE_AFTERIMAGE) && !XFT |
1198 | # if !defined(HAVE_AFTERIMAGE) && !XFT |
1196 | /* our own client-side tinting */ |
1199 | /* our own client-side tinting */ |
1197 | /* ATTENTION: We ASSUME that XFT will let us do all the tinting necessary server-side. |
1200 | /* ATTENTION: We ASSUME that XFT will let us do all the tinting necessary server-side. |
1198 | This may need to be changed in need_client_side_rendering() logic is altered !!! */ |
1201 | This may need to be changed in need_client_side_rendering() logic is altered !!! */ |
1199 | if (result != NULL && !(background_flags & transpPmapTinted) && (flags & tintNeeded)) |
1202 | if (!(background_flags & transpPmapTinted) && (flags & tintNeeded)) |
1200 | { |
1203 | { |
1201 | rgba c (rgba::MAX_CC,rgba::MAX_CC,rgba::MAX_CC); |
1204 | rgba c (rgba::MAX_CC,rgba::MAX_CC,rgba::MAX_CC); |
1202 | if (flags & tintSet) |
1205 | if (flags & tintSet) |
1203 | tint.get (c); |
1206 | tint.get (c); |
1204 | ShadeXImage (target, result, shade, c.r, c.g, c.b); |
1207 | ShadeXImage (target, result, shade, c.r, c.g, c.b); |
1205 | } |
1208 | } |
1206 | # endif |
1209 | # endif |
1207 | } |
|
|
1208 | |
1210 | |
1209 | if (result) |
|
|
1210 | { |
|
|
1211 | GC gc = XCreateGC (target->dpy, target->vt, 0UL, NULL); |
1211 | GC gc = XCreateGC (target->dpy, target->vt, 0UL, NULL); |
1212 | |
1212 | |
1213 | if (gc) |
1213 | if (gc) |
1214 | { |
1214 | { |
1215 | if (/*pmap_depth != target->depth &&*/ pixmap != None) |
1215 | if (/*pmap_depth != target->depth &&*/ pixmap != None) |