kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=26252064fed895fcb1ce891356fe8fa4c4f303c6
commit 26252064fed895fcb1ce891356fe8fa4c4f303c6 Author: Kim Woelders <k...@woelders.dk> Date: Tue Dec 8 19:09:08 2020 +0100 Introduce EImageRenderOnDrawableARGB() --- src/eimage.c | 21 +++++++++++++++++++++ src/eimage.h | 2 ++ 2 files changed, 23 insertions(+) diff --git a/src/eimage.c b/src/eimage.c index 4cb8dbdb..1817acf0 100644 --- a/src/eimage.c +++ b/src/eimage.c @@ -455,6 +455,27 @@ EImageRenderOnDrawable(EImage * im, Win win, EX_Drawable draw, int flags, imlib_context_set_visual(WinGetVisual(VROOT)); } +#if USE_XRENDER + +void +EImageRenderOnDrawableARGB(EImage * im, EX_Drawable draw, int w, int h) +{ + Visual *vis; + + imlib_context_set_image(im); + imlib_context_set_drawable(draw); + vis = EVisualFindARGB(); + if (vis) + imlib_context_set_visual(vis); + + imlib_render_image_on_drawable_at_size(0, 0, w, h); + + if (vis) + imlib_context_set_visual(WinGetVisual(VROOT)); +} + +#endif + void EImageRenderPixmaps(EImage * im, Win win, int flags, EX_Pixmap * ppmap, EX_Pixmap * pmask, int w, int h) diff --git a/src/eimage.h b/src/eimage.h index 7b5fc944..2d9a64d5 100644 --- a/src/eimage.h +++ b/src/eimage.h @@ -98,6 +98,8 @@ EImage *EImageGrabDrawableScaled(Win win, void EImageRenderOnDrawable(EImage * im, Win win, EX_Drawable draw, int flags, int x, int y, int w, int h); +void EImageRenderOnDrawableARGB(EImage * im, EX_Drawable draw, + int w, int h); void EImageRenderPixmaps(EImage * im, Win win, int flags, EX_Pixmap * pmap, --