[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cairo
Subject:    Re: [cairo] Line widths and coordinate system transformations
From:       "Gustavo Carneiro" <gjcarneiro () gmail ! com>
Date:       2008-06-05 14:57:10
Message-ID: a467ca4f0806050757m2b76d4fep4c9d05756eba94db () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


2008/6/5 Holger Berndt <berndth@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@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

[Attachment #5 (text/html)]

<br><br><div class="gmail_quote">2008/6/5 Holger Berndt &lt;<a \
href="mailto:berndth@gmx.de">berndth@gmx.de</a>&gt;:<br><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> <div class="Ih2E3d">On Do, 05.06.2008 15:27, Simon \
Budig wrote:<br> <br>
&gt;No, You can change the transformation between the path-creating commands<br>
&gt;and the cairo_stroke().<br>
<br>
</div>Thanks a lot, Dirk and Simon. Having different scalings during path<br>
creation and stroking of course does the trick. Awesome!</blockquote><div><br>Of \
course, a far simpler solution is to do the coordinate transformations completely \
outside of cairo contexts.&nbsp; 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.&nbsp; It may be a bit more \
typing, but it is also far more understandable in the end.<br> \
&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, \
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br> <font \
color="#888888"><br> Holger<br>
</font><div><div></div><div \
class="Wj3C7c">_______________________________________________<br> cairo mailing \
list<br> <a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
<a href="http://lists.cairographics.org/mailman/listinfo/cairo" \
target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a><br> \
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Gustavo J. A. M. \
Carneiro<br>INESC Porto, Telecommunications and Multimedia Unit<br>&quot;The universe \
is always one step beyond logic.&quot; -- Frank Herbert



_______________________________________________
cairo mailing list
cairo@cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic