unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Guile/Cairo, files formats/surfaces
@ 2015-08-02  8:17 Tomas By
  2015-08-05  8:32 ` Amirouche Boubekki
  0 siblings, 1 reply; 4+ messages in thread
From: Tomas By @ 2015-08-02  8:17 UTC (permalink / raw)
  To: guile-user; +Cc: wingo

Hi all,

(Am following instructions on http://www.nongnu.org/guile-cairo/dev/)

I'm trying to create EPS files using guile-cairo, but have some 
problems. Am using version 1.14.2, the latest in Ubuntu.

scheme@(guile-user)> (cairo-version-string)
$1 = "1.14.2"

According to the web documentation at
http://www.nongnu.org/guile-cairo/docs/html/PostScript-Surfaces.html#PostScript-Surfaces
there should be a procedure `cairo-ps-surface-set-eps' to make the 
Postscript surface produce EPS, but this procedure is not defined:

scheme@(guile-user)> cairo-ps-surface-set-eps
;;; <unknown-location>: warning: possibly unbound variable 
`cairo-ps-surface-set-eps'

(It is not listed in /usr/share/guile/site/cairo/cairo-procedures.txt 
either, whatever that may mean.)

Also, the `recording' surface does not seem to be included in 
guile-cairo. Is there some reason for this? (other than lack of 
time/round tuits)

Finally, I am using SVG surfaces to make images which I then draw on PS 
surfaces and include in a Latex document. What surprises me is that the 
final pictures seem to be pixellated, not vector drawings. I am only 
using some simple Cairo commands (move to, line to, arc) to create the 
images. It seems to me that since SVG & PS/EPS are all vector formats 
there should not be any pixellation at all?

Grateful for any help in explaining this.

/Tomas




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Guile/Cairo, files formats/surfaces
  2015-08-02  8:17 Guile/Cairo, files formats/surfaces Tomas By
@ 2015-08-05  8:32 ` Amirouche Boubekki
  2015-08-05  8:50   ` Tomas By
  0 siblings, 1 reply; 4+ messages in thread
From: Amirouche Boubekki @ 2015-08-05  8:32 UTC (permalink / raw)
  To: Tomas By; +Cc: wingo, guile-user, guile-user-bounces+amirouche=hypermove.net

Le 2015-08-02 10:17, Tomas By a écrit :
> Hi all,
> 
> (Am following instructions on http://www.nongnu.org/guile-cairo/dev/)
> 
> I'm trying to create EPS files using guile-cairo, but have some
> problems.

Can you share a small snippet that works for images? I'd like to output 
a pdf, but I can't.

Thanks.

> Am using version 1.14.2, the latest in Ubuntu.
> 
> scheme@(guile-user)> (cairo-version-string)
> $1 = "1.14.2"
> 
> According to the web documentation at
> http://www.nongnu.org/guile-cairo/docs/html/PostScript-Surfaces.html#PostScript-Surfaces
> there should be a procedure `cairo-ps-surface-set-eps' to make the
> Postscript surface produce EPS, but this procedure is not defined:
> 
> scheme@(guile-user)> cairo-ps-surface-set-eps
> ;;; <unknown-location>: warning: possibly unbound variable
> `cairo-ps-surface-set-eps'
> 
> (It is not listed in /usr/share/guile/site/cairo/cairo-procedures.txt
> either, whatever that may mean.)
> 
> Also, the `recording' surface does not seem to be included in
> guile-cairo. Is there some reason for this? (other than lack of
> time/round tuits)
> 
> Finally, I am using SVG surfaces to make images which I then draw on
> PS surfaces and include in a Latex document. What surprises me is that
> the final pictures seem to be pixellated, not vector drawings. I am
> only using some simple Cairo commands (move to, line to, arc) to
> create the images. It seems to me that since SVG & PS/EPS are all
> vector formats there should not be any pixellation at all?
> 
> Grateful for any help in explaining this.
> 
> /Tomas

-- 
Amirouche ~ amz3 ~ http://www.hyperdev.fr



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Guile/Cairo, files formats/surfaces
  2015-08-05  8:32 ` Amirouche Boubekki
@ 2015-08-05  8:50   ` Tomas By
  2015-08-05  9:05     ` Amirouche Boubekki
  0 siblings, 1 reply; 4+ messages in thread
From: Tomas By @ 2015-08-05  8:50 UTC (permalink / raw)
  To: Amirouche Boubekki
  Cc: wingo, guile-user, guile-user-bounces+amirouche=hypermove.net

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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Guile/Cairo, files formats/surfaces
  2015-08-05  8:50   ` Tomas By
@ 2015-08-05  9:05     ` Amirouche Boubekki
  0 siblings, 0 replies; 4+ messages in thread
From: Amirouche Boubekki @ 2015-08-05  9:05 UTC (permalink / raw)
  To: Tomas By; +Cc: wingo, guile-user, guile-user-bounces+amirouche=hypermove.net

Le 2015-08-05 10:50, Tomas By a écrit :
> 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
> 

Nothing in particular. I could not get the particular set of instruction 
in the correct order.

Thanks.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-05  9:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-02  8:17 Guile/Cairo, files formats/surfaces Tomas By
2015-08-05  8:32 ` Amirouche Boubekki
2015-08-05  8:50   ` Tomas By
2015-08-05  9:05     ` Amirouche Boubekki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).