Iv’e been trying to get a nvgRect to rotate in a stationary position on a panel.
nvgRotate(context, float angle);
Does this even work on basic shapes or is there something missing from the code. note commented code has been tried.
snippet from v1 but also tried in 0.6.x
//TestPanel *module;
float pos1 = 0.f;
NVGcolor blackTransparent = nvgRGBA(0, 0, 0, 35);
nvgBeginPath(rect.vg);
// context, float x, float y, float w, float h
nvgRect(rect.vg, pos1, pos1 - 6.f, 30.f, 25.f);
//nvgSkewX(rect.vg, 60.f);////does nothing
//nvgSkewY(rect.vg, 60);////does nothing
//nvgQuadTo(rect.vg, pos1, pos1 - 20, 30, 30);////does something, no rotation
nvgFillColor(rect.vg, blackTransparent);
nvgFill(rect.vg);
nvgRotate(rect.vg, 30.f);
nvgClosePath(rect.vg);
//nvgSave(rect.vg);
//nvgRestore(rect.vg);
from the doc it says: Rotates current coordinate system. Angle is specified in radians.
If nvgRect does not rotate any ideas of another way to create a square/rectangle with NVG and get it rotated by a certain angle in a stationary position?