[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] how to create a cairo_matrix_t (defined by define-fo
From: |
Markus Klotzbuecher |
Subject: |
Re: [Chicken-users] how to create a cairo_matrix_t (defined by define-foreign-type) ? |
Date: |
Mon, 6 Feb 2012 21:27:58 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi Christian,
On Mon, Jan 30, 2012 at 11:36:36AM +0100, Christian Kellermann wrote:
> * Markus Klotzbuecher <address@hidden> [120130 11:29]:
> > > Markus did you have a chance to have a look at the code? I would
> > > love to release a new cairo version. If there are any missing
> > > features on your wishlist, please let me know!
> >
> > I unfortuately did not have any time to look into this so far. I hope
> > to give it a try towards the end of the week. One (low priority) thing
> > on my wishlist would be support for writing to svg files. I suppose
> > the latter would be largely a duplication of the png code, but I have
> > not looked into it yet.
>
> I *think* it is just a matter of providing the wrapper...
Indeed, trivial patch below...
Best regards
Markus
>From bd772574ee2ed9a898b50d79b3d31e069dffee42 Mon Sep 17 00:00:00 2001
From: Markus Klotzbuecher <address@hidden>
Date: Mon, 6 Feb 2012 21:24:24 +0100
Subject: [PATCH] add support for svg, pdf and ps surfaces
---
release/4/cairo/trunk/cairo.scm | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/release/4/cairo/trunk/cairo.scm b/release/4/cairo/trunk/cairo.scm
index f86bcd5..22a60aa 100644
--- a/release/4/cairo/trunk/cairo.scm
+++ b/release/4/cairo/trunk/cairo.scm
@@ -35,7 +35,9 @@
(foreign-declare #<<EOF
#include "cairo.h"
-
+#include "cairo-svg.h"
+#include "cairo-pdf.h"
+#include "cairo-ps.h"
EOF
)
@@ -109,6 +111,21 @@ EOF
int
int))
+(define cairo-svg-surface-create (foreign-lambda cairo_surface_t
"cairo_svg_surface_create"
+ c-string
+ double
+ double))
+
+(define cairo-pdf-surface-create (foreign-lambda cairo_surface_t
"cairo_pdf_surface_create"
+ c-string
+ double
+ double))
+
+(define cairo-ps-surface-create (foreign-lambda cairo_surface_t
"cairo_ps_surface_create"
+ c-string
+ double
+ double))
+
; cairo-create-image deprecated
; cairo-set-target-image deprecated
--
1.7.7.3