guile-user
[Top][All Lists]
Advanced

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

Re: Guile/Cairo, files formats/surfaces


From: Tomas By
Subject: Re: Guile/Cairo, files formats/surfaces
Date: Wed, 05 Aug 2015 10:50:56 +0200
User-agent: XS4ALL Webmail

Hi,

On 2015-08-05 10:32, Amirouche Boubekki wrote:
Can you share a small snippet that works for images? I'd like to
output a pdf, but I can't.

Not sure what you are having problems with, but this produces a PDF:

(define (pdf-file)
  (let* ((sf (cairo-pdf-surface-create 842 595 "test.pdf"))
         (cr (cairo-create sf)))
    (let ((pi (* 2 (acos 0))))
      (cairo-set-line-width cr 10)
      (cairo-arc cr 400 300 20 0 (* 2 pi))
      (cairo-stroke cr)
      (cairo-surface-finish sf))))

/Tomas




reply via email to

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