Use current OpenFL for SVG tool

This commit is contained in:
Joshua Granick
2015-08-23 01:59:07 -07:00
parent d176780fee
commit a1098bf86c
3 changed files with 4 additions and 4 deletions

BIN
svg.n

Binary file not shown.

View File

@@ -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) {

View File

@@ -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