[gs-devel] Problems using libgs
Albert Astals Cid
aacid at kde.org
Tue Oct 30 14:47:00 PDT 2007
A Dimarts 30 Octubre 2007, Albert Astals Cid va escriure:
> Hi, together with some other devels we are building a simple gs library on
> the top of libgs.
>
> We have encountered a drawing problem we don't know how to solve.
>
> A very simple sample code reproducing the problems we get is at
> http://www.tsdgeos.com/gs/main.cpp
>
> The file i use for the test is http://www.tsdgeos.com/gs/fermi.eps
>
> The output image i get is http://www.tsdgeos.com/gs/image.png
>
> I'm wondering what i'm doing wrong since gv seems to be able to render that
> file correctly (the image appears centered) and at "Pixel based" 1:1 zoom
> (for gv that means 72dpi) the "canvas" has a size of 500x500 (like the one
> i'm passing to libgs)
I've investigated more and i'm [almost] sure that this happens because gv
passes llx, lly, urx and ury and i'm just passing WidthxHeight so my device
does not has ImagingBBox while gv one has it and that's why i get
a "translated" rendering compared to gv one.
Is it possible to set ImagingBBox using gs options like "-g", "-r", etc?
Albert
>
> You'll need cairo for compiling the test, i have a Qt based one too, ask if
> you prefer it.
>
> You can compile it with gcc main.cpp -lgs -lcairo -I /usr/include/cairo/
>
> Thanks,
> Albert
> _______________________________________________
> gs-devel mailing list
> gs-devel at ghostscript.com
> http://www.ghostscript.com/mailman/listinfo/gs-devel
More information about the gs-devel
mailing list