Skip to content

Bugs when circle and rect need rotate #58

@liaoxiaochen

Description

@liaoxiaochen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions