I’m so sorry for my poor english !
I found some questions about mask when the mask is rotating and moving.
For example:
no mask: All platforms are right !
class Main extends Sprite
{
public function new()
{
super();
var test:Sprite = new Sprite();
test.graphics.beginFill(0xff0000);
test.graphics.drawRect(0, 0, 200, 200);
test.graphics.endFill();
this.addChild(test);
public function new()
{
super();
var test:Sprite = new Sprite();
test.graphics.beginFill(0xff0000);
test.graphics.drawRect(0, 0, 200, 200);
test.graphics.endFill();
this.addChild(test);
Currently, HTML5 and DOM renderers support only square masking (we have plans to enable complex masking in the future using framebuffers and an updated shader), but I think canvas supports more masking types. WebGL is our default on HTML5
The OpenGL and HTML5 -Ddom renderers use only rectangular masking at the moment, so that’s expected.
The Cairo renderer (like openfl test neko -Dcairo or using bitmapData.draw on native) renders properly, but I see the issue here on canvas. I believe that canvas clipping has a bug here – if we clip without using rotation in the canvas context transform, it works properly. The greater the degree of rotation, though, the more it doesn’t look quite right.
This probably works if the shape itself is drawn with a rotation (using lineTo commands), perhaps in the future, someone might rotate the coordinates within our canvas graphics renderer rather than using a transform