nanovg icon indicating copy to clipboard operation
nanovg copied to clipboard

Is Rotating a path possible in nanovg?

Open Blaxxun75 opened this issue 6 years ago • 1 comments

Hello, iam new to nanovg and i have a question.

What would be the best way to draw rotating procedural gears? Is nanovg capable to do that with paths?

Or do i have to calculate all transformations and vector points myself and then make a path out of it and then stroke the path?

The end goal is to export the gear in a vector format for further 3D meshing.

Thanks! :)

Blaxxun75 avatar Jan 03 '19 00:01 Blaxxun75

Transform the context with nvgRotate() before drawing the path, and don't forget to reset it back by wrapping it with nvgSave() and nvgRestore().

AndrewBelt avatar Jan 20 '19 11:01 AndrewBelt