From 54a15367e0b7b4f086bbfb94d1b84dd542ee95a8 Mon Sep 17 00:00:00 2001 Message-Id: <54a15367e0b7b4f086bbfb94d1b84dd542ee95a8.1717506790.git.mdw@distorted.org.uk> From: Mark Wooding Date: Fri, 6 Apr 2007 14:12:09 +0000 Subject: [PATCH] Added optional NEGATIVE-P argument to function CIRCLE Organization: Straylight/Edgeware From: espen --- cairo/cairo.lisp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cairo/cairo.lisp b/cairo/cairo.lisp index 63b1f70..74bf02a 100644 --- a/cairo/cairo.lisp +++ b/cairo/cairo.lisp @@ -20,7 +20,7 @@ ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;; $Id: cairo.lisp,v 1.11 2007/02/19 14:37:52 espen Exp $ +;; $Id: cairo.lisp,v 1.12 2007/04/06 14:12:09 espen Exp $ (in-package "CAIRO") @@ -498,8 +498,13 @@ (defpath line-to (x y) t) (defpath move-to (x y) t) (defpath rectangle (x y width height)) -(defun circle (cr x y radius) - (arc cr x y radius 0.0 (* pi 2))) +(defun circle (cr x y radius &optional negative-p) + (move-to cr radius 0.0d0) + (if negative-p + (arc-negative cr x y radius (* pi 2) 0.0d0) + (arc cr x y radius 0.0d0 (* pi 2))) + (close-path cr)) + (defbinding glyph-path (cr glyphs) nil (cr context) -- [mdw]