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

Bugs when circle and rect need rotate #58

Open
liaoxiaochen opened this issue Dec 28, 2023 · 0 comments
Open

Bugs when circle and rect need rotate #58

liaoxiaochen opened this issue Dec 28, 2023 · 0 comments

Comments

@liaoxiaochen
Copy link

When the svg code need convert to SVGCircle and SVGRect, and need to add rotate attribute, it can't display correctly.

I found this issue is caused by below code, ".applyShapeAttributes(model: model)" should below the frame, position and offset.
Circle()
.applySVGStroke(stroke: model.stroke)
.applyShapeAttributes(model: model)
.frame(width: 2 * model.r, height: 2 * model.r)
.position(x: model.cx, y: model.cy)

both with SVGRect
RoundedRectangle(cornerSize: CGSize(width: model.rx, height: model.ry))
.applySVGStroke(stroke: model.stroke)
.applyShapeAttributes(model: model)
.frame(width: model.width, height: model.height)
.position(x: model.x, y: model.y)
.offset(x: model.width/2, y: model.height/2)

I want to raise a pull request to fix it, but can't push my branch successful, hope your team can fix it.

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