El dom, 24-02-2013 a las 23:22 +0100, Johan Engelen escribió:
On 23-2-2013 20:32, Jabiertxo Arraiza Cenoz wrote:
Hi. I have a problem. Its this: T get the last subpath of a Geom::Path::const_iterator whith a this options: end_open(), end(), end_default(), end_closed() and this subpath is not degenerated at the end. But never get a CubicBezier from the last subpath. Anybody can help me?
I don't understand your exact question, but perhaps this will help.
General advice: *only* use end_open(), end_closed(), or end_default(). 2geom offers an end() method for paths, but do not use it; it makes the code difficult to read because end() returns end_open().
end_open() returns the last segment assuming that the path is not closed.
end_closed() always returns a ClosingSegment (which is a LineSegment). It assumes the path is closed. (even if it is not closed). The returned segment is a straight line from start to end, closing the path. For paths that look curved, this segment will probably be degenerate, i.e. infinitely small.
end_default(): returns end_open() for open paths, and returns end_closed() for closed paths.
Cheers, Johan
Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Thanks very much Johan. My english is bad but i attempt to explain the problem.
While coding, i decide i need to use "end_open()", when read your words it confirm me.
Why i decide use "end_open" in closed paths? because y want to know the cubicBezier of the last visible path, ignoring the extra seg who closed the path. Is this ok?
The problem is the bezier curve in [2] always return value at [3].
Put code of the function.
Hi, and thanks.