Problems with svg

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Problems with svg

This post was updated on .
Hot to get an SVG smoothly scaled? What am I doing wrong?

My test - the svg and the fxg are looking exactly the same in illustrator:

<s:View xmlns:fx="" xmlns:s="library://" xmlns:local="*" creationComplete="test(event)">

        import spark.core.SpriteVisualElement;

        public var testSVG:Class;

        public var testFXG:SpriteVisualElement = new test3();

        private function test(e:Event):void
            var m:Matrix = new Matrix();
            m.scale(4, 4);

            var s:Sprite = new testSVG();

            var bd:BitmapData = new BitmapData(200, 200, true, 0x00ffffff);
            bd.draw(s, m, null, null, null, true);
            bi1.source = bd;

            var bd2:BitmapData = new BitmapData(200, 200, true, 0x00ffffff);
            bd2.draw(testFXG, m, null, null, null, true);
            bi2.source = bd2;


        <s:HGroup padding="20">
                <s:BitmapImage id="bi1" width="200" height="200" smooth="true" smoothingQuality="high" />
                <s:BitmapImage id="bi2" width="200" height="200" smooth="true" smoothingQuality="high" />


leads to ...


Sent from: