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

stroke and fill with SVGNode #39

Closed
anthony1810 opened this issue Apr 27, 2023 · 1 comment
Closed

stroke and fill with SVGNode #39

anthony1810 opened this issue Apr 27, 2023 · 1 comment

Comments

@anthony1810
Copy link

I want to fill and stroke these nodes, what should I do to achieve that?
let view = SVGView(contentsOf: Bundle.main.url(forResource: svgName, withExtension: "svg")!) let node = view.getNode(byId: "\(1)")

@f3dm76
Copy link
Collaborator

f3dm76 commented May 12, 2023

Hey @anthony1810, you can do it like this:

let node = view.getNode(byId: "\(1)")
node.fill = SVGColor.black
node.stroke = SVGStroke(fill: SVGColor(hex: "ABCDEF"), width: 2)

Have a nice day

@f3dm76 f3dm76 closed this as completed May 12, 2023
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

2 participants