Use current OpenFL for SVG tool
This commit is contained in:
@@ -8,6 +8,7 @@ import lime.tools.helpers.PathHelper;
|
|||||||
import lime.tools.helpers.PlatformHelper;
|
import lime.tools.helpers.PlatformHelper;
|
||||||
import openfl.display.Bitmap;
|
import openfl.display.Bitmap;
|
||||||
import openfl.display.BitmapData;
|
import openfl.display.BitmapData;
|
||||||
|
import openfl.display.PNGEncoderOptions;
|
||||||
import openfl.display.Shape;
|
import openfl.display.Shape;
|
||||||
import openfl.geom.Matrix;
|
import openfl.geom.Matrix;
|
||||||
import lime.project.Architecture;
|
import lime.project.Architecture;
|
||||||
@@ -53,7 +54,7 @@ class SVGExport {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
path += "/legacy/ndll/";
|
path += "/ndll/";
|
||||||
|
|
||||||
switch (PlatformHelper.hostPlatform) {
|
switch (PlatformHelper.hostPlatform) {
|
||||||
|
|
||||||
@@ -168,7 +169,7 @@ class SVGExport {
|
|||||||
var bitmapData = new BitmapData (width, height, true, backgroundColor);
|
var bitmapData = new BitmapData (width, height, true, backgroundColor);
|
||||||
bitmapData.draw (shape);
|
bitmapData.draw (shape);
|
||||||
|
|
||||||
File.saveBytes (outputPath, bitmapData.encode ("png"));
|
File.saveBytes (outputPath, bitmapData.encode (bitmapData.rect, new PNGEncoderOptions ()));
|
||||||
|
|
||||||
} catch (e:Dynamic) {
|
} catch (e:Dynamic) {
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,5 @@
|
|||||||
-lib lime
|
-lib lime
|
||||||
-lib openfl
|
-lib openfl
|
||||||
-lib svg
|
-lib svg
|
||||||
-D openfl-legacy
|
-D lime_cairo
|
||||||
-D lime-legacy
|
|
||||||
--remap flash:openfl
|
--remap flash:openfl
|
||||||
|
|||||||
Reference in New Issue
Block a user