Repository navigation
Add support for more complex strokes - #505
Conversation
|
Awesome, I'll take a closer look later, but I like it! |
|
Coolio! I am currently working on gradients/filling patterns on ALL paint objects. Stuff is starting to come together! |
|
Hmm, maybe I should rename |
|
Thanks for your feedback! I will be away for a couple of days now, but when I get back I will go through your suggestions. |
|
I have incorporated your suggestions now and also updated the |
|
Hey, would you mind having a bit of a discussion over at discord? (my handle is Gaffa#4308). I have communicated with reiknh, and have partially implemented gradients for filling. I think line caps and line joins are great as a separate commit, but i think dash-patterns is a special case of a pattern applied along a line. The issue is here #443, but I think most can be discussed over discord if you have the time. Right now there is no implementation of patterns, but when that comes I think the dash-patterns will be made using that. |
|
Did you two discuss on Discord and, if so, what was the result? |
|
Just a little bit. My understanding is that patterns along paths is quite far away atm so I don't think there is too much point in waiting for this. I also think that anyways it is nice to utilize PDF's native support for dash patterns which would probably be more efficient (in document size terms). Finally I think that having simple support for dash patterns in the public API is important even if they are implemented in a different way, and there should be nothing in the way of changing the underlying implementation in the future. |
|
Thanks! |
This patch adds more complex stroking, specifically it adds:
A couple of questions that needs answering before this is ready:
lineandrectlooks ok.Castimpl ofSidesin a way that results in not so good error messages. That is, you won't get any error about the valid fields ofSides, only it's internal type: in this casestroke.Currently there are some dash patterns that will give different results when rendering to image and pdf (dash arrays with only one element)Related to #260