Rendering a SVG

Hello, I’m tryin to use a svg file in my project and I don’t understand the how it supposed to work. I looked at the demo here (doc) and there’s no example of it. Only this:

lng.Tools.createSvg(cb, stage, url, w, h)

From that I don’t understand what is cb and stage.

1 Like

The Lightning doc should be updated. :upside_down_face:

Try “getSvgTexture” method it will work following the style of the other method.

getSvgTexture :

Svg: {
x: 10,
y: 200,
zIndex: 2,
color: 0xFFFFFFFF,
texture: lng.Tools.getSvgTexture(’./static/tryit.svg’, 300, 300),

:zap: createSvg vs getSvgTexture · Issue #88 · rdkcentral/Lightning · GitHub

1 Like

We are currently working on a big rewrite of our documentation. I’l be sure to put this improvement on the list as well.



wonderful @michiel thank you very much it’s greatly appreciated. have a nice day Sir :slightly_smiling_face: