<div>You mean set path as stroke for annother path ?</div>
<div>This is what I think now.</div>
<div>but I don't know how to implement that.</div>
<div> </div>
<div><br><br> </div>
<div><span class="gmail_quote">2006/11/10, Mike Emmel <<a href="mailto:mike.emmel@gmail.com">mike.emmel@gmail.com</a>>:</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 <<a href="mailto:behdad@behdad.org">behdad@behdad.org</a>> wrote:<br>> On Thu, 2006-11-09 at 12:49 -0500, Mike Emmel wrote:
<br>> > I've been thinking about the concept of having paths as resource like<br>> > patterns or fonts.<br>><br>> What is the problem you are trying to solve?<br>><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 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>> --<br>> behdad<br>> <a href="http://behdad.org/">http://behdad.org/</a><br>><br>> "Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
<br>> -- Dan Bern, "New American Language"<br>><br>><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>