… | |
… | |
616 | layers[0].clip_width = target_width; |
616 | layers[0].clip_width = target_width; |
617 | layers[0].clip_height = target_height; |
617 | layers[0].clip_height = target_height; |
618 | layers[0].tint = background_tint; |
618 | layers[0].tint = background_tint; |
619 | layers[1].im = result; |
619 | layers[1].im = result; |
620 | |
620 | |
621 | if (w <= 0) |
621 | if (h_scale == 0 || v_scale == 0) |
622 | { |
622 | { |
623 | /* tile horizontally */ |
623 | /* tile horizontally */ |
624 | while (x > 0) x -= (int)result->width; |
624 | while (x > 0) x -= (int)result->width; |
625 | layers[1].dst_x = x; |
625 | layers[1].dst_x = x; |
626 | layers[1].clip_width = result->width+target_width; |
626 | layers[1].clip_width = result->width+target_width; |
… | |
… | |
630 | /* clip horizontally */ |
630 | /* clip horizontally */ |
631 | layers[1].dst_x = x; |
631 | layers[1].dst_x = x; |
632 | layers[1].clip_width = result->width; |
632 | layers[1].clip_width = result->width; |
633 | } |
633 | } |
634 | |
634 | |
635 | if (h <= 0) |
635 | if (h_scale == 0 || v_scale == 0) |
636 | { |
636 | { |
637 | while (y > 0) y -= (int)result->height; |
637 | while (y > 0) y -= (int)result->height; |
638 | layers[1].dst_y = y; |
638 | layers[1].dst_y = y; |
639 | layers[1].clip_height = result->height + target_height; |
639 | layers[1].clip_height = result->height + target_height; |
640 | } |
640 | } |
… | |
… | |
1001 | } |
1001 | } |
1002 | |
1002 | |
1003 | bool |
1003 | bool |
1004 | bgPixmap_t::set_tint (rxvt_color &new_tint) |
1004 | bgPixmap_t::set_tint (rxvt_color &new_tint) |
1005 | { |
1005 | { |
1006 | if (tint != new_tint) |
1006 | if (!(flags & tintSet) || tint != new_tint) |
1007 | { |
1007 | { |
1008 | unsigned long new_flags = compute_tint_shade_flags (&new_tint, shade); |
1008 | unsigned long new_flags = compute_tint_shade_flags (&new_tint, shade); |
1009 | tint = new_tint; |
1009 | tint = new_tint; |
1010 | flags = (flags & ~tintFlags) | new_flags | tintSet; |
1010 | flags = (flags & ~tintFlags) | new_flags | tintSet; |
1011 | return true; |
1011 | return true; |
… | |
… | |
1088 | c.g = (c.g * shade) / 100; |
1088 | c.g = (c.g * shade) / 100; |
1089 | c.b = (c.b * shade) / 100; |
1089 | c.b = (c.b * shade) / 100; |
1090 | } |
1090 | } |
1091 | else if (shade > 100 && shade < 200) |
1091 | else if (shade > 100 && shade < 200) |
1092 | { |
1092 | { |
1093 | c.r = (c.r * (200 - shade)) / 100; |
1093 | c.r = ((0xffff - c.r) * (200 - shade)) / 100; |
1094 | c.g = (c.g * (200 - shade)) / 100; |
1094 | c.g = ((0xffff - c.g) * (200 - shade)) / 100; |
1095 | c.b = (c.b * (200 - shade)) / 100; |
1095 | c.b = ((0xffff - c.b) * (200 - shade)) / 100; |
1096 | } |
1096 | } |
1097 | |
1097 | |
1098 | XRenderPictFormat pf; |
1098 | XRenderPictFormat pf; |
1099 | pf.type = PictTypeDirect; |
1099 | pf.type = PictTypeDirect; |
1100 | pf.depth = 32; |
1100 | pf.depth = 32; |