-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: rxvt-unicode-sixel
action: commit
revision:
path_from:
revision_from: adb07ee86b13b4d74039f8ad5edc86f1598b8475:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

git://git.thebackupbox.net/rxvt-unicode-sixel

commit adb07ee86b13b4d74039f8ad5edc86f1598b8475
Author: Marc Lehmann <schmorp@schmorp.de>
Date:   Thu Jun 7 11:52:26 2012 +0000

    *** empty log message ***

diff --git a/src/perl/background b/src/perl/background

index 44d59c36ae50d5e3d8dbfe7a360da2979e9e2ca3..

index ..2dd7eb19cfdac5b7ddef62b439339a13930295db 100644

--- a/src/perl/background
+++ b/src/perl/background
@@ -4,7 +4,7 @@
 #:META:X_RESOURCE:%.enable:boolean:some boolean
 #:META:X_RESOURCE:%.extra.:value:extra config

-our $EXPR = 'move W * 0.1, -H * 0.1, resize W * 0.5, H * 0.5, repeat_none load "MagnoliaAlpha.png"';
+our $EXPR = 'move W * 0.1, -H * 0.1, resize W * 0.5, H * 0.5, repeat_none load "opensource.png"';
 #$EXPR = '
 #   rotate W, H, 50, 50, counter 1/59.95, repeat_mirror,
 #   clip X, Y, W, H, repeat_mirror,
diff --git a/src/rxvtimg.C b/src/rxvtimg.C

index c1264649566e718857a08491573de38c34c0a380..

index ..18bac6f7c0a1f8522c7187035b4995533e30eb19 100644

--- a/src/rxvtimg.C
+++ b/src/rxvtimg.C
@@ -411,8 +411,15 @@ rxvt_img::reify ()
   Picture src = src_picture ();
   Picture dst = XRenderCreatePicture (dpy, img->pm, img->format, 0, 0);

-  XRenderComposite (dpy, PictOpSrc, src, None, dst, x, y, 0, 0, 0, 0, w, h);
-
+  if (alpha)
+    {
+      XRenderColor rc = { 0, 0, 0, 0 };
+      XRenderFillRectangle (dpy, PictOpSrc, dst, &rc, 0, 0, w, h);
+      XRenderComposite (dpy, PictOpSrc, src, None, dst, 0, 0, 0, 0, -x, -y, ref->w, ref->h);
+    }
+  else
+    XRenderComposite (dpy, PictOpSrc, src, None, dst, x, y, 0, 0, 0, 0, w, h);
+
   XRenderFreePicture (dpy, src);
   XRenderFreePicture (dpy, dst);

@@ -478,7 +485,15 @@ rxvt_img::scale (int new_width, int new_height)
     0,                      0, 1
   };

-  return transform (new_width, new_height, matrix);
+  int old_repeat_mode = repeat;
+  repeat = RepeatPad; // not right, but xrender can't proeprly scale it seems
+
+  rxvt_img *img = transform (new_width, new_height, matrix);
+
+  repeat = old_repeat_mode;
+  img->repeat = repeat;
+
+  return img;
 }

 rxvt_img *
@@ -505,6 +520,8 @@ rxvt_img::convert_to (XRenderPictFormat *new_format, const rxvt_color &bg)
   rxvt_img *img = new rxvt_img (s, new_format, 0, 0, w, h, repeat);
   img->alloc ();

+  printf ("convert %d to %d\n", format->direct.alphaMask, new_format->direct.alphaMask);//D
+
   Display *dpy = s->display->dpy;
   Picture src = src_picture ();
   Picture dst = XRenderCreatePicture (dpy, img->pm, new_format, 0, 0);

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 10:21:18 2024