ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/background.C
(Generate patch)

Comparing rxvt-unicode/src/background.C (file contents):
Revision 1.45 by sf-exg, Sun Aug 29 16:10:42 2010 UTC vs.
Revision 1.47 by sf-exg, Mon Aug 30 23:42:37 2010 UTC

480 } 480 }
481 481
482 if (!(background_flags & transpPmapBlured) && (flags & blurNeeded) && background != NULL) 482 if (!(background_flags & transpPmapBlured) && (flags & blurNeeded) && background != NULL)
483 { 483 {
484 ASImage *tmp = blur_asimage_gauss (target->asv, background, h_blurRadius, v_blurRadius, 0xFFFFFFFF, 484 ASImage *tmp = blur_asimage_gauss (target->asv, background, h_blurRadius, v_blurRadius, 0xFFFFFFFF,
485 (original_asim == NULL || tint == TINT_LEAVE_SAME)?ASA_XImage:ASA_ASImage, 485 (original_asim == NULL || tint == TINT_LEAVE_SAME) ? ASA_XImage : ASA_ASImage,
486 100, ASIMAGE_QUALITY_DEFAULT); 486 100, ASIMAGE_QUALITY_DEFAULT);
487 if (tmp) 487 if (tmp)
488 { 488 {
489 destroy_asimage (&background); 489 destroy_asimage (&background);
490 background = tmp; 490 background = tmp;
508 508
509 if (original_asim) 509 if (original_asim)
510 { 510 {
511 if (h_align == rootAlign || v_align == rootAlign) 511 if (h_align == rootAlign || v_align == rootAlign)
512 { 512 {
513 target->get_window_origin(x, y); 513 target->get_window_origin (x, y);
514 x = -x; 514 x = -x;
515 y = -y; 515 y = -y;
516 } 516 }
517 517
518 if (h_align != rootAlign) 518 if (h_align != rootAlign)
670 pixmap = XCreatePixmap (target->dpy, target->vt, new_pmap_width, new_pmap_height, target->depth); 670 pixmap = XCreatePixmap (target->dpy, target->vt, new_pmap_width, new_pmap_height, target->depth);
671 pmap_width = new_pmap_width; 671 pmap_width = new_pmap_width;
672 pmap_height = new_pmap_height; 672 pmap_height = new_pmap_height;
673 pmap_depth = target->depth; 673 pmap_depth = target->depth;
674 } 674 }
675 /* fill with background color ( if result's not completely overlapping it)*/ 675 /* fill with background color (if result's not completely overlapping it) */
676 gcv.foreground = target->pix_colors[Color_bg]; 676 gcv.foreground = target->pix_colors[Color_bg];
677 gc = XCreateGC (target->dpy, target->vt, GCForeground, &gcv); 677 gc = XCreateGC (target->dpy, target->vt, GCForeground, &gcv);
678 678
679 int src_x = 0, src_y = 0, dst_x = 0, dst_y = 0; 679 int src_x = 0, src_y = 0, dst_x = 0, dst_y = 0;
680 int dst_width = result->width, dst_height = result->height; 680 int dst_width = result->width, dst_height = result->height;
1173 && pmap_depth == target->depth) 1173 && pmap_depth == target->depth)
1174 flags = flags & ~isInvalid; 1174 flags = flags & ~isInvalid;
1175 } 1175 }
1176# endif 1176# endif
1177 1177
1178 XImage *result = NULL;
1179# ifdef HAVE_AFTERIMAGE 1178# ifdef HAVE_AFTERIMAGE
1180 if (original_asim 1179 if (original_asim
1181 || (background_flags & transpTransformations) != (flags & transpTransformations)) 1180 || (background_flags & transpTransformations) != (flags & transpTransformations))
1182 { 1181 {
1183 if (render_asim (background_flags)) 1182 if (render_asim (background_flags))
1184 flags = flags & ~isInvalid; 1183 flags = flags & ~isInvalid;
1185 } 1184 }
1186 else if (background_flags && pmap_depth != target->depth) 1185# endif
1187 result = XGetImage (target->dpy, pixmap, 0, 0, pmap_width, pmap_height, AllPlanes, ZPixmap);
1188 1186
1189# elif !XFT /* our own client-side tinting */ 1187 XImage *result = NULL;
1190
1191 /* ATTENTION: We ASSUME that XFT will let us do all the tinting necessary server-side.
1192 This may need to be changed in need_client_side_rendering() logic is altered !!! */
1193 1188
1194 if (background_flags && (flags & isInvalid)) 1189 if (background_flags && (flags & isInvalid))
1195 { 1190 {
1196 result = XGetImage (target->dpy, pixmap, 0, 0, pmap_width, pmap_height, AllPlanes, ZPixmap); 1191 result = XGetImage (target->dpy, pixmap, 0, 0, pmap_width, pmap_height, AllPlanes, ZPixmap);
1197 1192
1193# if !defined(HAVE_AFTERIMAGE) && !XFT
1194 /* our own client-side tinting */
1195 /* ATTENTION: We ASSUME that XFT will let us do all the tinting necessary server-side.
1196 This may need to be changed in need_client_side_rendering() logic is altered !!! */
1198 if (result != NULL && !(background_flags & transpPmapTinted) && (flags & tintNeeded)) 1197 if (result != NULL && !(background_flags & transpPmapTinted) && (flags & tintNeeded))
1199 { 1198 {
1200 rgba c (rgba::MAX_CC,rgba::MAX_CC,rgba::MAX_CC); 1199 rgba c (rgba::MAX_CC,rgba::MAX_CC,rgba::MAX_CC);
1201 if (flags & tintSet) 1200 if (flags & tintSet)
1202 tint.get (c); 1201 tint.get (c);
1203 ShadeXImage (target, result, shade, c.r, c.g, c.b); 1202 ShadeXImage (target, result, shade, c.r, c.g, c.b);
1204 } 1203 }
1204# endif
1205 } 1205 }
1206# endif /* HAVE_AFTERIMAGE */
1207 1206
1208 if (result) 1207 if (result)
1209 { 1208 {
1210 GC gc = XCreateGC (target->dpy, target->vt, 0UL, NULL); 1209 GC gc = XCreateGC (target->dpy, target->vt, 0UL, NULL);
1211 1210

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines