[Top][All Lists]

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

[ann] first release of guile-rsvg

From: Andy Wingo
Subject: [ann] first release of guile-rsvg
Date: Thu, 27 Sep 2007 02:02:22 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Hey hackers,

I'm a bit sleepy but there are new goodies here:

For example this fragment renders an SVG as a PDF:

    (use-modules (cairo) (rsvg) (srfi srfi-11))

    (define (svg->pdf in out)
      (let*-values (((handle) (rsvg-handle-new-from-file in))
                    ((width height em ex) (rsvg-handle-get-dimensions handle))
                    ((surf) (cairo-pdf-surface-create width height out))
                    ((ctx) (cairo-create surf)))
                   (rsvg-handle-render-cairo handle ctx)
                   (cairo-show-page ctx)
                   (cairo-surface-finish surf)))



reply via email to

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