… | |
… | |
138 | # endif |
138 | # endif |
139 | |
139 | |
140 | # ifdef BG_IMAGE_FROM_FILE |
140 | # ifdef BG_IMAGE_FROM_FILE |
141 | if (have_image) |
141 | if (have_image) |
142 | { |
142 | { |
143 | if (h_scale != 0 || v_scale != 0 |
143 | if (flags & sizeSensitive) |
144 | || h_align != 0 || v_align != 0) |
|
|
145 | return true; |
144 | return true; |
146 | } |
145 | } |
147 | # endif |
146 | # endif |
148 | |
147 | |
149 | return false; |
148 | return false; |
… | |
… | |
247 | make_clip_rectangle (int pos, int size, int target_size, int &dst_pos, int &dst_size) |
246 | make_clip_rectangle (int pos, int size, int target_size, int &dst_pos, int &dst_size) |
248 | { |
247 | { |
249 | int src_pos = 0; |
248 | int src_pos = 0; |
250 | dst_pos = 0; |
249 | dst_pos = 0; |
251 | dst_size = size; |
250 | dst_size = size; |
252 | if (pos < 0 && size > target_size) |
251 | if (pos < 0) |
253 | { |
252 | { |
254 | src_pos = -pos; |
253 | src_pos = -pos; |
255 | dst_size += pos; |
254 | dst_size += pos; |
256 | } |
255 | } |
257 | else if (pos > 0) |
256 | else if (pos > 0) |
… | |
… | |
472 | if (h_align != rootAlign) |
471 | if (h_align != rootAlign) |
473 | x = make_align_position (h_align, target_width, w > 0 ? w : image_width); |
472 | x = make_align_position (h_align, target_width, w > 0 ? w : image_width); |
474 | |
473 | |
475 | if (v_align != rootAlign) |
474 | if (v_align != rootAlign) |
476 | y = make_align_position (v_align, target_height, h > 0 ? h : image_height); |
475 | y = make_align_position (v_align, target_height, h > 0 ? h : image_height); |
|
|
476 | |
|
|
477 | flags &= ~sizeSensitive; |
|
|
478 | if (h_scale != 0 || v_scale != 0 |
|
|
479 | || h_align != 0 || v_align != 0 |
|
|
480 | || image_width > target_width || image_height > target_height) |
|
|
481 | flags |= sizeSensitive; |
477 | } |
482 | } |
478 | |
483 | |
479 | # ifdef HAVE_AFTERIMAGE |
484 | # ifdef HAVE_AFTERIMAGE |
480 | bool |
485 | bool |
481 | bgPixmap_t::render_image (unsigned long background_flags) |
486 | bgPixmap_t::render_image (unsigned long background_flags) |