[cairo] cairo reset

Mike Emmel mike.emmel at gmail.com
Tue Sep 26 23:58:05 PDT 2006


On 9/26/06, Vladimir Vukicevic <vladimirv at gmail.com> wrote:
> On 9/26/06, Mike Emmel <mike.emmel at gmail.com> wrote:
> > Except the cairo api right now has no way to determine it if there is
> > a current point or not.
> > I don't agree with you about it being broken. Read the SVG spec.
> > http://www.w3.org/TR/SVG/paths.html
>
> Why do you keep coming back to SVG?  Cairo is not a SVG renderer.  SVG
> is uninteresting to large parts of the world who want a 2D API.
>
Its a fairly well thought out spec they don't feel that relative
additions to a empty
path is and error. I don't feel its and error. Its fairly
straitforward to consider sensible
inital point choices for the various fragments.

> If you want a move_to(0,0) it's simple:
>
> my_cairo_new_path(cairo_t *cr) {
>     cairo_new_path (cr);
>     cairo_move_to (cr, 0, 0);
> }
>
> and just use that everywhere.  Why complicate things?
>
That breaks the empty test which is quite useful to stop processing early.
It was my initial approach. As you mentioned the choice of  00 may not
be correct for
all cases.

Consider this.  You have a relative operation say cairo_rel_curve_to
instead of performing the operation you flatten the paths to a number
of line_to's
you pass it to cairo there is no error.

Now why is it a error if the path is not flattened but exceptable if it is ?

I see a logic problem here.


>    - Vlad
>


More information about the cairo mailing list