[cairo] svn output clipped transparent
Tamas K Papp
tpapp at Princeton.EDU
Thu Jun 7 05:37:41 PDT 2007
Hi,
The right and lower sides of the svg files I output with Cairo seem to
be clipped. The SVG and the screenshot of how mirage and eog (Linux
utilities) render it is attached. The SVG appears to be OK, but I
don't know much about it -- is this a bug in Cairo or the SVG reader
library?
The figures were created by the following Common Lisp code (if you
don't know CL, all these operations map directly into Cairo calls).
libcairo2 is from the Debian package, version 1.4.6-1.1.
(defparameter *surface* (create-svg-surface "example.svg" 200 100))
(setf *context* (create-context *surface*))
(destroy *surface*)
;; clear the whole canvas with blue
(rectangle 0 0 200 100)
(set-source-rgb 0.2 0.2 1)
(fill-path)
;; draw a white diagonal line
(move-to 200 0)
(line-to 0 100)
(set-source-rgb 1 1 1)
(set-line-width 5)
(stroke)
;; destroy context, this also destroys the surface and closes the file
(destroy *context*)
Thanks,
Tamas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.svg
Type: image/svg+xml
Size: 665 bytes
Desc: not available
Url : http://cairographics.org/archives/cairo/attachments/20070607/51cade08/attachment.svg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.png
Type: image/png
Size: 694 bytes
Desc: not available
Url : http://cairographics.org/archives/cairo/attachments/20070607/51cade08/attachment.png
More information about the cairo
mailing list