Yes - the green form above is what it looks when I directly add it to the stage (without the red border - that was added using Photoshop).
Here is another snapshot, with the vertex indexes (Photoshop):
Another issue I've encountered was problems with touch events, when the mask was created with negative values, for example:
var mask_quad:Quad = new Quad(-128, -128);
I guess it might be a misuse, but it might point to some other bugs...
As for the "Canvas" option:
What would be the best approach, in terms of performance hit:
Mesh?
Canvas?
Stencil mask?
The code for creating the mesh mask, using 4 quads (my stage size is 1024x768):
private function buildMask():Mesh
{
var vertex_arr:Array = [0, 0, 256, 0, 0, 384, 256, 384, 704, 0, 960, 0, 704, 384, 960, 384, 256, 448, 704, 448];
//var color_arr:Array = [];
var vertexData:VertexData = new VertexData("position:float2, color:bytes4");
var i:int = 0;
for (i = 0; i < 10; i++) {
vertexData.setPoint(i, "position", vertex_arr[2 * i], vertex_arr[2 * i + 1]);
vertexData.setColor(i, "color", 0x00FF00);
}
var indexData:IndexData = new IndexData();
indexData.addQuad(0, 1, 2, 3);
indexData.addQuad(1, 4, 3, 6);
indexData.addQuad(4, 5, 6, 7);
indexData.addQuad(3, 6, 8, 9);
return new Mesh(vertexData, indexData);
}
And for adding it to the container:
var mask_mesh:Mesh = buildMask();
//this.addChild(mask_mesh);
mask_mesh.x = 32;
mask_mesh.y = -384;
//mask_mesh.alpha = 0.5;
_inventory_sprt.mask = mask_mesh;
I'd be happy to share the entire code, if needed.