Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17070

[Share] Cocos2d-x SVGSprite

$
0
0

@namkazt wrote:

Support cocos2d-x display SVG as sprite or path

ref: NanoSVG ( https://github.com/memononen/nanosvg )

For now it turn SVG to PNG data and create Texture2D from it. So image will break if scale.
Next thing i will add SVGImage to display fully SVG. ( already have but bug )

Setup:
Add source code to your Class folder or anywhere

Using:

#include "SVGSprite.h"

...

SVGSprite* testSVG = SVGSprite::create("tiger.svg", 0.5f);
this->addChild(testSVG);

Link: https://github.com/namkazt/CocosSVGSprite

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17070

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>