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

(Suggestion) Pattern support #80

Closed
buguibu opened this issue Feb 27, 2018 · 3 comments
Closed

(Suggestion) Pattern support #80

buguibu opened this issue Feb 27, 2018 · 3 comments

Comments

@buguibu
Copy link

buguibu commented Feb 27, 2018

I can't draw a stripped pattern defined like this:

<pattern height="8" id="diagonal-stripes" patternTransform="rotate(60)" patternUnits="userSpaceOnUse" width="8" x="0" y="0"> <rect height="8" style="stroke:none; fill:#cdd4d8;" width="3" x="0" y="0"/></pattern>

used in this way:

<path d="..." id="1870b04c-0503-4906-a9c7-b844ed2d2f10" style="fill: url(#diagonal-stripes)"/>.

Seems like fill only accepts hexadecimal colours as value.

@mchoe
Copy link
Owner

mchoe commented Mar 7, 2018

Yes, fill color accepts hex values and named values for now. While patterns aren't supported now, I'm going to file this as an enhancement and something to consider. Thanks for filing the ticket.

@mchoe mchoe closed this as completed Mar 7, 2018
@buguibu
Copy link
Author

buguibu commented Sep 5, 2018

I had try with PaintApp importing the SVG and it wasn´t able to generate any code.

@buguibu
Copy link
Author

buguibu commented Sep 5, 2018

A progress:

func diagonalStripe(_ aThing: String) {
        self.svgLayer.fillColor = UIColor(patternImage: #imageLiteral(resourceName: "pattern")).cgColor
}

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

No branches or pull requests

2 participants