<div>You mean set path as stroke&nbsp;for annother path ?</div>
<div>This is what I think now.</div>
<div>but I don't know how to implement that.</div>
<div>&nbsp;</div>
<div><br><br>&nbsp;</div>
<div><span class="gmail_quote">2006/11/10, Mike Emmel &lt;<a href="mailto:mike.emmel@gmail.com">mike.emmel@gmail.com</a>&gt;:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On 11/9/06, Behdad Esfahbod &lt;<a href="mailto:behdad@behdad.org">behdad@behdad.org</a>&gt; wrote:<br>&gt; On Thu, 2006-11-09 at 12:49 -0500, Mike Emmel wrote:
<br>&gt; &gt; I've been thinking about the concept of having paths as resource like<br>&gt; &gt; patterns or fonts.<br>&gt;<br>&gt; What is the problem you are trying to solve?<br>&gt;<br><br>The basic problem is that I need to create and manipulate paths before
<br>I know the<br>destination surface.<br><br>Cairo does not really support paths outside of a cairo_t structure.<br>And there is no way to transfer a path between cairo_t's except to<br>export it to a floating point format.
<br><br>If you build paths up outside cairo_t your forced into a floating<br>point format. If you don't have a fpu this means redeveloping all of<br>the fixed point logic.<br><br>Most graphics systems treat paths as first class objects cairo does not.
<br>This means paths are created and manipulated before the destination<br>surface is known.<br>Cairo does not support the concept.<br><br>SVG postscript etc all support paths as standalone objects.<br><br>For example<br>
<br><a href="http://developer.classpath.org/pipermail/classpath/2006-July/001253.html">http://developer.classpath.org/pipermail/classpath/2006-July/001253.html</a><br><br>To me the problem the developer is facing in this example is the lack
<br>of ability to save<br>path information in a optimized format. If he had a handle to the<br>internal path structure&nbsp;&nbsp;it would help.<br><br>Right now my approach is to create a cairo_t with a one pixel surface<br>to serve as a proxy for a path. The problem is that to transfer this
<br>path to the real surface for rendering requires that I copy out the<br>path in floating point format then reapply it to the destination. Also<br>of course I can't freadily flatten the path or perform other<br>operations to optimize drawing of known paths.
<br><br>To flatten a path now requires.<br><br>p = cairo_copy_path_flat()<br>cairo_new_path()<br>cairo_append_path(p)<br><br>So even if you have the right cairo_t you have to do a copy just to<br>flatten a path.<br><br>By having paths only exist in a cairo_t your tying paths to the
<br>destination I don't believe this tie is required.<br><br><br><br><br>&gt; --<br>&gt; behdad<br>&gt; <a href="http://behdad.org/">http://behdad.org/</a><br>&gt;<br>&gt; &quot;Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill&quot;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Dan Bern, &quot;New American Language&quot;<br>&gt;<br>&gt;<br>_______________________________________________<br>cairo mailing list<br><a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a>
<br><a href="http://cairographics.org/cgi-bin/mailman/listinfo/cairo">http://cairographics.org/cgi-bin/mailman/listinfo/cairo</a><br></blockquote></div><br>