gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_fi


From: Bastiaan Jacques
Subject: Re: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-2083-g223b921
Date: Fri, 30 May 2014 22:28:51 +0200 (CEST)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)



On Fri, 30 May 2014, Richard Wilbur wrote:

On Fri, May 30, 2014 at 6:30 AM, Bastiaan Jacques <address@hidden> wrote:
stored. It would probably be more elegant to store the control point
only for actual curves; patches are welcome.

So (dx, dy) are not differentials in x and y but the coordinates of
the new point?  If they were differentials I would expect to store
something like
     new_x = dx + current_x;
     new_y = dy + current_y;
     m_edges.emplace_back(new_x, new_y, new_x, new_y);

No, these are absolute coordinates. (Actually, SWF files provide
relative coordinates, but they are converted to absolute coordinates by
class ShapeRecord.)

You mention an Edge as storing the curve's control point.  Is that in
addition to the end point?  If so, is that the way we tell that this
is a straight line instead of an actual curve?

The way we can tell this is a straight Edge (line) is by checking if the
control point is the same as the destination point, which is just what
Edge::straight() does.

But it would be better if we had structs LineTo { point dest; };
CurveTo { point control; point anchor; }; MoveTo { point dest; }; and
then Path could have a vector<boost::variant<MoveTo, LineTo, CurveTo>>
instead of vector<Edge>. Or something along those lines.

Bastiaan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]