… | |
… | |
46 | * W and H are percentages of the terminal window size. |
46 | * W and H are percentages of the terminal window size. |
47 | * X and Y are also percentages; e.g., +50+50 centers |
47 | * X and Y are also percentages; e.g., +50+50 centers |
48 | * the image in the window. |
48 | * the image in the window. |
49 | * |
49 | * |
50 | * Pixmap Operations : (should be prepended by a colon) |
50 | * Pixmap Operations : (should be prepended by a colon) |
51 | * tile Tile image. Scaling/position modifiers above will affect |
|
|
52 | * the tile size and origin. |
|
|
53 | * propscale When scaling, scale proportionally. That is, maintain the |
|
|
54 | * proper aspect ratio for the image. Any portion of the |
|
|
55 | * background not covered by the image is filled with the |
|
|
56 | * current background color. |
|
|
57 | * scale Scale both up and down |
|
|
58 | */ |
51 | */ |
59 | |
52 | |
60 | #ifdef HAVE_BG_PIXMAP |
53 | #ifdef HAVE_BG_PIXMAP |
61 | void |
54 | void |
62 | rxvt_term::bg_destroy () |
55 | rxvt_term::bg_destroy () |
… | |
… | |
255 | { |
248 | { |
256 | char **arr = rxvt_strsplit (':', ops + 1); |
249 | char **arr = rxvt_strsplit (':', ops + 1); |
257 | |
250 | |
258 | for (int i = 0; arr[i]; i++) |
251 | for (int i = 0; arr[i]; i++) |
259 | { |
252 | { |
|
|
253 | if (!strcasecmp (arr[i], "style=tiled")) |
|
|
254 | { |
|
|
255 | new_flags = BG_TILE; |
|
|
256 | w = h = noScale; |
|
|
257 | x = y = 0; |
|
|
258 | geom_flags = WidthValue|HeightValue|XValue|YValue; |
|
|
259 | } |
|
|
260 | else if (!strcasecmp (arr[i], "style=aspect-stretched")) |
|
|
261 | { |
|
|
262 | new_flags = BG_PROP_SCALE; |
|
|
263 | x = y = centerAlign; |
|
|
264 | geom_flags = XValue|YValue; |
|
|
265 | } |
|
|
266 | else if (!strcasecmp (arr[i], "style=stretched")) |
|
|
267 | { |
|
|
268 | new_flags = 0; |
|
|
269 | w = h = windowScale; |
|
|
270 | geom_flags = WidthValue|HeightValue; |
|
|
271 | } |
|
|
272 | else if (!strcasecmp (arr[i], "style=centered")) |
|
|
273 | { |
|
|
274 | new_flags = 0; |
|
|
275 | w = h = noScale; |
|
|
276 | x = y = centerAlign; |
|
|
277 | geom_flags = WidthValue|HeightValue|XValue|YValue; |
|
|
278 | } |
|
|
279 | else if (!strcasecmp (arr[i], "style=root-tiled")) |
|
|
280 | { |
|
|
281 | new_flags = BG_TILE|BG_ROOT_ALIGN; |
|
|
282 | w = h = noScale; |
|
|
283 | geom_flags = WidthValue|HeightValue; |
|
|
284 | } |
|
|
285 | else if (!strcasecmp (arr[i], "op=tile")) |
|
|
286 | new_flags |= BG_TILE; |
|
|
287 | else if (!strcasecmp (arr[i], "op=pscale")) |
|
|
288 | new_flags |= BG_PROP_SCALE; |
|
|
289 | else if (!strcasecmp (arr[i], "op=root")) |
|
|
290 | new_flags |= BG_ROOT_ALIGN; |
|
|
291 | |
|
|
292 | // deprecated |
260 | if (!strcasecmp (arr[i], "tile")) |
293 | else if (!strcasecmp (arr[i], "tile")) |
261 | { |
294 | { |
262 | new_flags |= BG_TILE; |
295 | new_flags |= BG_TILE; |
263 | w = h = noScale; |
296 | w = h = noScale; |
264 | geom_flags |= WidthValue|HeightValue; |
297 | geom_flags |= WidthValue|HeightValue; |
265 | } |
298 | } |
… | |
… | |
271 | { |
304 | { |
272 | if (h == 0) h = windowScale; |
305 | if (h == 0) h = windowScale; |
273 | if (w == 0) w = windowScale; |
306 | if (w == 0) w = windowScale; |
274 | |
307 | |
275 | geom_flags |= WidthValue|HeightValue; |
308 | geom_flags |= WidthValue|HeightValue; |
276 | } |
|
|
277 | else if (!strcasecmp (arr[i], "center")) |
|
|
278 | { |
|
|
279 | w = h = noScale; |
|
|
280 | x = y = centerAlign; |
|
|
281 | geom_flags |= WidthValue|HeightValue|XValue|YValue; |
|
|
282 | } |
309 | } |
283 | else if (!strcasecmp (arr[i], "root")) |
310 | else if (!strcasecmp (arr[i], "root")) |
284 | { |
311 | { |
285 | new_flags |= BG_TILE|BG_ROOT_ALIGN; |
312 | new_flags |= BG_TILE|BG_ROOT_ALIGN; |
286 | w = h = noScale; |
313 | w = h = noScale; |