[cairo] Line widths and coordinate system transformations

Gustavo Carneiro gjcarneiro at gmail.com
Thu Jun 5 07:57:10 PDT 2008


2008/6/5 Holger Berndt <berndth at gmx.de>:

> On Do, 05.06.2008 15:27, Simon Budig wrote:
>
> >No, You can change the transformation between the path-creating commands
> >and the cairo_stroke().
>
> Thanks a lot, Dirk and Simon. Having different scalings during path
> creation and stroking of course does the trick. Awesome!


Of course, a far simpler solution is to do the coordinate transformations
completely outside of cairo contexts.  When I used cairo for plotting in the
past, what I did was create my own coordinate transformation matrix, to
which you can apply scaling and translation as usual, and simply apply this
transformation matrix to every coordinate before passing it down to cairo
proper.  It may be a bit more typing, but it is also far more understandable
in the end.


>
>
> Holger
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>



-- 
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20080605/992eba60/attachment.html 


More information about the cairo mailing list