Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example SVG rendering in Haxe/NME. Because I will forget how to do this later.
<?xml version="1.0" encoding="utf-8"?>
<!-- ... -->
<window antialiasing="4" /> <!-- For smooth rendering on native targets (flash target is already antialiased) -->
<!-- ... -->
import nme.Assets;
import nme.display.Shape;
import nme.display.Sprite;
import format.SVG;
class SVGExample extends Sprite
var svg:SVG;
var shape:Shape;
public function new()
svg = new SVG(Assets.getText("nme.svg"));
shape = new Shape();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment