bitmapData.draw() doesn't work in OpenFL linked to haxe/hxcpp project (Mac)

I have haxe/hxcpp project, in which I use a bit of OpenFL (compiling with haxe compiler with hxml flags -lib lime -lib openfl, not the openfl command, for Mac native cpp target). Loading the image works fine,

var img:BitmapData = BitmapData.fromBytes(bytes);

the problem occurs with this

var rotatedImg:BitmapData = new BitmapData(rotatedImgSize, rotatedImgSize, true, 0x00000000);
rotatedImg.draw(img, true);

rotatedImg stays blank (with default colour). Same code works in project compiled with openfl command. Is there any reason, why this shouldn’t work? (openfl 3.6.0, lime 2.9.0)

You can see with openfl display mac that there is a lot of flags required,
I wouldn’t recommend not using the openfl command.

Well, I need it in console application, so I’ll have to figure this out or make my own system for rotation of bitmaps, so…

In that case maybe try adding -D next -D openfl-next -D tools=2.9.0 -D native -D lime-native -D openfl-native -D mac -D desktop --macro openfl.Lib.includeExterns() --remap flash:openfl.

Thanks for directing me. Just adding

 -D lime_cairo

worked in the end. I’ve looked into the openfl.display.BitmapData draw() method source and saw it is using this to determine what rendering method to use, otherwise it didn’t seem to be too much dependent on anything else, so I tried it and it worked.