limweb / degrafa

Automatically exported from code.google.com/p/degrafa
1 stars 0 forks source link

BezierSpline.autoClose not working in a GeometryGroup #75

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In ActionScript:
1. add a BezierSpline to a GeometryGroup
2. set autoClose = true

BezierSpline throws error in line 598

Looks like it tries to access a CubicCage for the last point of the spline
which doesn't exist.

This doesn't occur when drawing the path to a Shape instead. 

Seen in Rev 481 of the Origin branch

Original issue reported on code.google.com by dorian....@googlemail.com on 26 Jan 2009 at 8:15

GoogleCodeExporter commented 9 years ago
I just found out that this is the effect of one too many items in the _bezier 
array.
The cause seems to be a second call of initPoints() after the additional point 
has
been added to close the path (in _assignControlPoints() )

As a quick workaround I just added this in line 597:
if (!c) break;

that sems to solve this issue for the moment ;)

Original comment by dorian....@googlemail.com on 26 Jan 2009 at 9:23