[cairo] cairo_new_sub_path: Making cairo_arc easier to
use and more
Carl Worth
cworth at cworth.org
Thu Feb 23 22:23:52 PST 2006
On Thu, 23 Feb 2006 21:34:51 -0800, Carl Worth wrote:
> On Tue, 24 Jan 2006 12:27:14 -0800, Bill Spitzak wrote:
>
> > So just to make it clear, I think close_path should be equivalent to:
> >
> > 1. line_to the original point
> > 2. secret stuff to make them mitre together into a loop
> > 3. new_sub_path
>
> And I think we want to add:
>
> 4. move_to the original point
I'm not thinking straight. That step #3 is redundant there. So better
would be:
1. line_to the original point
2. secret stuff to add the line join
3. move_to the original point
Or simpler to just say that after the call to cairo_close_path the
current point is defined and it is at the join point. That's what I
did in the commit I just made (shown below).
> I'm convinced. I'll go shove this into a new-sub-path branch in my
> personal cairo tree.
It's there now. If one wanted to examine it, one could do:
git clone git://git.cairographics.org/~cworth/cairo ;
cd cairo ;
git checkout new-sub-path
-Carl
diff-tree cb778760cb87e727a701603bcea3a2cdc063d785 (from 1dc1b57b4eaa55b7a5cafe39f818f7c87352ea6d)
Author: Carl Worth <cworth at cworth.org>
Date: Thu Feb 23 22:07:13 2006 -0800
cairo_close_path: Document that there will be a current point after
cairo_close_path.
diff --git a/src/cairo.c b/src/cairo.c
index 6a94d0f..3319e2b 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -1417,7 +1417,8 @@ cairo_stroke_to_path (cairo_t *cr)
*
* Adds a line segment to the path from the current point to the
* beginning of the current subpath, (the most recent point passed to
- * cairo_move_to()), and closes this subpath.
+ * cairo_move_to()), and closes this subpath. After this call the
+ * current point will be at the joined endpoint of the subpath.
*
* The behavior of cairo_close_path() is distinct from simply calling
* cairo_line_to() with the equivalent coordinate in the case of
@@ -1425,7 +1426,8 @@ cairo_stroke_to_path (cairo_t *cr)
* the ends of the subpath. Instead, there is a line join connecting
* the final and initial segments of the subpath.
*
- * If there is no current point, this function will have no effect.
+ * If there is no current point before the call to cairo_close_path,
+ * this function will have no effect.
**/
void
cairo_close_path (cairo_t *cr)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060223/27d47bb3/attachment.pgp
More information about the cairo
mailing list