From 5d18000c9ec1bc244622e352a4161b8836e8ac66 Mon Sep 17 00:00:00 2001 Message-Id: <5d18000c9ec1bc244622e352a4161b8836e8ac66.1714456312.git.mdw@distorted.org.uk> From: Mark Wooding Date: Fri, 19 Oct 2007 10:12:25 +0000 Subject: [PATCH] Added functions to copy paths Organization: Straylight/Edgeware From: espen --- cairo/cairo.lisp | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/cairo/cairo.lisp b/cairo/cairo.lisp index f81c895..82b3107 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.16 2007/10/16 07:48:39 espen Exp $ +;; $Id: cairo.lisp,v 1.17 2007/10/19 10:12:25 espen Exp $ (in-package "CAIRO") @@ -326,11 +326,12 @@ (defclass context (ref-counted-object) (:unref %destroy)) -;; (defclass path (proxy) -;; () -;; (:metaclass proxy-class)) - - ) + (defclass path (struct) + ((status :allocation :alien :type status) + (data :allocation :alien :type pointer) + (length :allocation :alien :type int)) + (:metaclass proxy-class) + (:unref %path-destroy))) ;;; Cairo context @@ -453,6 +454,19 @@ (defbinding show-page () nil ;;; Paths +(defbinding %path-destroy () nil + (location pointer)) + +(defbinding copy-path () path + (cr context)) + +(defbinding copy-path-flat () path + (cr context)) + +(defbinding append-path () nil + (cr context) + (path path)) + (defbinding get-current-point () nil (cr context) (x double-float :out) -- [mdw]