From 27053df512c8670ded0b926ff8a5b374178ba503 Mon Sep 17 00:00:00 2001 Message-Id: <27053df512c8670ded0b926ff8a5b374178ba503.1715356628.git.mdw@distorted.org.uk> From: Mark Wooding Date: Wed, 31 Oct 2007 11:52:53 +0000 Subject: [PATCH] Fixed broken FONT-EXTENTS binding Organization: Straylight/Edgeware From: espen --- cairo/cairo.lisp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cairo/cairo.lisp b/cairo/cairo.lisp index b743c77..dc04a5a 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.17 2007-10-19 10:12:25 espen Exp $ +;; $Id: cairo.lisp,v 1.18 2007-10-31 11:52:53 espen Exp $ (in-package "CAIRO") @@ -140,6 +140,13 @@ (defclass matrix (struct) :accessor matrix-y0 :type double-float)) (:metaclass struct-class)) + (defclass font-extents (struct) + ((ascent :allocation :alien :reader font-extents-ascent :type double-float) + (descent :allocation :alien :reader font-extents-descent :type double-float) + (height :allocation :alien :reader font-extents-height :type double-float) + (max-x-advance :allocation :alien :reader font-extents-max-x-advance :type double-float) + (max-y-advance :allocation :alien :reader font-extents-max-y-advance :type double-float)) + (:metaclass struct-class)) (defclass text-extents (struct) ((x-bearing :allocation :alien :reader text-extents-x-bearing :type double-float) @@ -657,8 +664,9 @@ (defbinding show-glyphs () nil (glyphs (vector glyph)) ((length glyphs) int)) -(defbinding font-extents () boolean - (cr context)) +(defbinding font-extents (cr &optional (extents (make-instance 'font-extents))) nil + (cr context) + (extents font-extents :in/return)) (defbinding text-extents (cr text &optional (extents (make-instance 'text-extents))) nil (cr context) -- [mdw]