Hi all
I’ve a question about nanoVG. Hope you can help me.
Let say I create an articulate path, x-translated by offsetX
value:
// save state
nvgSave(args.vg);
// translate x
nvgTranslate(args.vg, offsetX, 0.0f);
// create path
nvgBeginPath(args.vg);
// ... lots of nvgMoveTo/nvgLineTo
nvgClosePath(args.vg);
// draw path
nvgFill(args.vg);
nvgStroke(args.vg);
// restore state
nvgRestore(args.vg);
Now, before nvgRestore(args.vg)
, I’d like to take the same generated path and draw it translated by another offsetX. Such getting the same path and draw it multiple times, at different X.
I’d prefer to not reiterate the path for each x-offset. But instead, create the path once and draw it more times, simply changing the X-offset only.
Any idea? Thanks, as usual!