[cairo] How can I find out where the line start in cairo_line_to

Behdad Esfahbod behdad at behdad.org
Fri Dec 21 13:34:31 PST 2007


On Fri, 2007-12-21 at 16:15 -0500, ying lcs wrote:
> Hi,
> 
> Can you  please tell me if there is an api from cairo which I can call
> to find out where will the line start if I call cairo_line_to()?
> 
>  cairo_line_to(mCairo, pt.x, pt.y);

cairo_get_current_point()


> I have the above call in my code, but I am not sure where does the
> line start, I lost track of where did I move the starting point to.

Then use cairo_move_to()

> And how many ways I can change the starting point of cairo_line_to?
> The only way i know is cairo_move_to? is there anything else?

Most path operations implicitly moves the current point, but
cairo_move_to is the only one that only moves the current point and does
nothing else.

> Thank you.

-- 
behdad
http://behdad.org/

...very few phenomena can pull someone out of Deep Hack Mode, with two
noted exceptions: being struck by lightning, or worse, your *computer*
being struck by lightning.  -- Matt Welsh



More information about the cairo mailing list