I’ve previously asked about non-convex shapes potentially being filled incorrectly in OpenFL, but I think there’s a new round of problems. Here’s a simple demonstration:
package;
import openfl.display.Sprite;
class Main extends Sprite {
public function new () {
super();
graphics.lineStyle( 2.0 );
graphics.beginFill( 0x8080ff );
graphics.moveTo( 100, 100 );
graphics.lineTo( 150, 100 );
graphics.lineTo( 150, 150 );
graphics.lineTo( 200, 150 );
graphics.lineTo( 200, 100 );
graphics.lineTo( 250, 100 );
graphics.lineTo( 250, 150 );
graphics.lineTo( 250, 200 );
graphics.lineTo( 200, 200 );
graphics.lineTo( 150, 200 );
graphics.lineTo( 100, 200 );
graphics.lineTo( 100, 150 );
graphics.endFill();
}
}
It’s clear that the boundary of the U-shaped pentomino doesn’t match up with the region that ends up getting filled. This is with OpenFL 2.2.6 testing with neko, though I see the same problem with other targets too.
The problem might be related to collinear vertices – at least, the problem goes away in this example if I eliminate the collinear vertices.
(Forgive me for not filing a bug against this behaviour. Because of the scope of OpenFL and Lime, I’m honestly no longer sure where specifically to file the bug report. If someone would like to educate me on that front, I’d be happy to try to take that route in the future.)
Thanks.