sammycage / lunasvg

SVG rendering and manipulation library in C++
MIT License
866 stars 124 forks source link

Rotate elements #20

Closed OriBibi closed 3 years ago

OriBibi commented 3 years ago

Peace. I would love to know if it is possible for you to rotate elements? Something like the following link: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform

sammycage commented 3 years ago

Yes.. You can use SVGElement::setAttribute Example :

SVGElement* rootElement = document.rootElement();
rootElement->setAttribute("transform", "rotate(45)");