-
Notifications
You must be signed in to change notification settings - Fork 95
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
StrokeStyle should not use a Vec internally #416
Labels
enhancement
New feature or request
Comments
cmyr
added a commit
that referenced
this issue
Mar 16, 2021
This started out as my just wanting to fix #416 while it was on my mind, and then, well, things got a little out of hand. I realized I wasn't familiar with some of the terminology used, so I patched up the docs based on the postscript manual. Then I noticed there were a few areas where the API seemed confusing, and where the backends had to duplicate a bunch of code in order to set defaults, so I went through and implemented `Default`, using the defaults mentioned in the spec. Highlights: - 'dash' is replaced with separate 'dash_pattern' and 'dash_offset' methods - StrokeStyle can now be constructed in a const context - dash pattern can now be represented with a static &[f64] slice - miter limit is now a member of the LineJoin::Miter variant. - LineCap::Square is replaced with LineCap::ProjectingSquare, which more closely matches the naming in postscript and hopefully helps to differentiate it from LineCap::Butt.
cmyr
added a commit
that referenced
this issue
Mar 23, 2021
This started out as my just wanting to fix #416 while it was on my mind, and then, well, things got a little out of hand. I realized I wasn't familiar with some of the terminology used, so I patched up the docs based on the postscript manual. Then I noticed there were a few areas where the API seemed confusing, and where the backends had to duplicate a bunch of code in order to set defaults, so I went through and implemented `Default`, using the defaults mentioned in the spec. Highlights: - 'dash' is replaced with separate 'dash_pattern' and 'dash_offset' methods - StrokeStyle can now be constructed in a const context - dash pattern can now be represented with a static &[f64] slice - miter limit is now a member of the LineJoin::Miter variant. - LineCap::Square is replaced with LineCap::ProjectingSquare, which more closely matches the naming in postscript and hopefully helps to differentiate it from LineCap::Butt.
cmyr
added a commit
that referenced
this issue
Mar 26, 2021
This started out as my just wanting to fix #416 while it was on my mind, and then, well, things got a little out of hand. I realized I wasn't familiar with some of the terminology used, so I patched up the docs based on the postscript manual. Then I noticed there were a few areas where the API seemed confusing, and where the backends had to duplicate a bunch of code in order to set defaults, so I went through and implemented `Default`, using the defaults mentioned in the spec. Highlights: - 'dash' is replaced with separate 'dash_pattern' and 'dash_offset' methods - StrokeStyle can now be constructed in a const context - dash pattern can now be represented with a static &[f64] slice - miter limit is now a member of the LineJoin::Miter variant.
cmyr
added a commit
that referenced
this issue
Mar 26, 2021
This started out as my just wanting to fix #416 while it was on my mind, and then, well, things got a little out of hand. I realized I wasn't familiar with some of the terminology used, so I patched up the docs based on the postscript manual. Then I noticed there were a few areas where the API seemed confusing, and where the backends had to duplicate a bunch of code in order to set defaults, so I went through and implemented `Default`, using the defaults mentioned in the spec. Highlights: - 'dash' is replaced with separate 'dash_pattern' and 'dash_offset' methods - StrokeStyle can now be constructed in a const context - dash pattern can now be represented with a static &[f64] slice - miter limit is now a member of the LineJoin::Miter variant.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We would like this to be something that is cheap to clone and hold on to, so I think I'd prefer to store an
Rc<[]>
internally.I also might split up the
dash_offset
anddash_lengths
into separate fields. 🤷Originally posted by @cmyr in linebender/druid#1647 (comment)
The text was updated successfully, but these errors were encountered: