Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is rotate not implemented in rect? #43

Open
wbpaley opened this issue Oct 11, 2024 · 0 comments
Open

Is rotate not implemented in rect? #43

wbpaley opened this issue Oct 11, 2024 · 0 comments

Comments

@wbpaley
Copy link

wbpaley commented Oct 11, 2024

Thank you in general for this excellent work!

Figma can save to SVG, but when I read in a file that contains things like this:
(Note penultimate code line.)

<rect id="Rectangle 833_18" 
x="98.5" y="65.5" width="11" height="11" rx="0.5" 
fill="#2B2925" stroke="#393939"/>
<rect id="Rectangle 835_18" 
x="101.5" y="71.5" width="1" height="5"  
transform="rotate(-90 101.5 71.5)" 
fill="#A1A1A1" stroke="#4D4D4D"/>

The path.segments PathEvents seem to have non-rotated rects.

Here's a close-up of my resulting display, where the white glyphs toward the left should be + and - signs (to open & close subtrees in this embryonic tree-grid):

Screenshot 2024-10-11 at 1 21 16 AM

Am I doing something wrong?
Or do others see this and can I request an enhancement to implement this rotate?
(Seems like even if we don't want to support every part of SVG, Figma dumps are common usages?)

P.S. Did a quick check and turned one rect into an ellipse; same issue--I'm guessing rotate() can be used on all basic shapes. Both rotated rects & ellipses render properly rotated in InkScape and Brave.

Thanks!
Brad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant