chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] imlib2 image-draw-ellipse, image-fill-ellipse


From: John J Foerch
Subject: [Chicken-hackers] imlib2 image-draw-ellipse, image-fill-ellipse
Date: Sun, 11 Sep 2016 10:10:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hello,

This patch provides two more bindings for the imlib2 egg.  I would
appreciate if a release of the egg could be tagged after adding this
patch.

Thanks!

>From 329487577305bed1b6df78a4b0c2db30d3516af3 Mon Sep 17 00:00:00 2001
From: "John J. Foerch" <address@hidden>
Date: Sun, 11 Sep 2016 10:06:32 -0400
Subject: [PATCH] image-draw-ellipse, image-fill-ellipse: new bindings

---
 imlib2.scm | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/imlib2.scm b/imlib2.scm
index 950dbd0..27b119e 100644
--- a/imlib2.scm
+++ b/imlib2.scm
@@ -50,7 +50,7 @@
    image-crop&scale image-pixel/rgba image-pixel/hsva image-pixel/hlsa
    image-pixel/cmya color/rgba color/hsva color/hlsa color/cmya color?
    image-draw-pixel image-draw-line image-draw-rectangle image-draw-text
-   image-fill-rectangle 
+   image-fill-rectangle image-draw-ellipse image-fill-ellipse
    font-load make-image image-ptr gc-collect-image)
 
 (import chicken scheme foreign)
@@ -471,9 +471,16 @@
   (context-set-color color)
   ((foreign-lambda void imlib_image_fill_rectangle int int int int) x y width 
height))
 
+(define/img (image-draw-ellipse img color xc yc a b)
+  (context-set-color color)
+  ((foreign-lambda void imlib_image_draw_ellipse int int int int) xc yc a b))
+
+(define/img (image-fill-ellipse img color xc yc a b)
+  (context-set-color color)
+  ((foreign-lambda void imlib_image_fill_ellipse int int int int) xc yc a b))
+
 ; XXX: TODO: imlib_clip_line, imlib_image_copy_alpha_(rectangle_)to_image
-;           imlib_image_scroll_rect, imlib_image_copy_rect,
-;           imlib_image_draw_ellipse, imlib_image_fill_ellipse
+;           imlib_image_scroll_rect, imlib_image_copy_rect
 ;
 ; Polygon drawing functions
 
-- 
2.9.3


reply via email to

[Prev in Thread] Current Thread [Next in Thread]