raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=14e7a5c3625df85fba6a4eb5158e6ad127834ace

commit 14e7a5c3625df85fba6a4eb5158e6ad127834ace
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Sun Jan 5 17:25:15 2020 +0000

    shot - fix padded shots out of comp bounds...
    
    clip to comp area so we dont end up with blank areas.
---
 src/modules/shot/e_mod_main.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c
index 16bdbaf9b..00af59f3e 100644
--- a/src/modules/shot/e_mod_main.c
+++ b/src/modules/shot/e_mod_main.c
@@ -112,10 +112,11 @@ _shot_now(E_Zone *zone, E_Client *ec, const char *params)
         y = ec->y - pad;
         w = ec->w + (pad * 2);
         h = ec->h + (pad * 2);
-        x = E_CLAMP(x, 0, e_comp->w);
-        y = E_CLAMP(y, 0, e_comp->h);
-        w = E_CLAMP(w, 1, e_comp->w);
-        h = E_CLAMP(h, 1, e_comp->h);
+        E_RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, e_comp->w, e_comp->h);
+        if (w < 1) w = 1;
+        if (h < 1) h = 1;
+        if (x >= e_comp->w) x = e_comp->w - 1;
+        if (y >= e_comp->h) y = e_comp->h - 1;
      }
    if (eina_streq(ecore_evas_engine_name_get(e_comp->ee), "buffer"))
      {

-- 


Reply via email to