When I compile my project without “-Dv2” (with everyhting is fine), all my sprites which are rendered using spritesheet are rendered completely incorrect.
I read somehwhere in this forum that there are still problems with transformations. That would make sense, since spritesheet must transform a lot.
So I am wondering, is this still an issue and I should simply wait? Or is it a problem that has to be changed in spritesheet and it would make sense to investigate?
I made a minimal example of the problem:
I have this bitmap:
The inner rect is at position (25,25) hand has a size of (50,50).
Now, I want to to draw it (the inner rect) on the screen at position (25,25) but scale by 2 to size (100,100). I do not want to draw any yellow. This code works with v2:
import openfl.display.Sprite;
import openfl.geom.Matrix;
class Main extends Sprite {
public function new () {
super ();
var bitmap = openfl.Assets.getBitmapData('assets/example.png');
var mx = new Matrix();
mx.translate(-25,-25);
mx.scale(2,2);
mx.translate(25,25);
graphics.beginBitmapFill(bitmap, mx, false, true);
graphics.drawRect(25,25,100,100);
graphics.endFill();
}
}
So the problem is not inside spritesheet but inside Graphics . I tested the code on a mac, had the same result, can’t test on windows because I have driver issues with the new openfl.
I can confirm It’s a bug.