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

Fix rendering of dotted corners when corner radius < border width. #2007

Merged
merged 2 commits into from Nov 9, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Some generated files are not rendered by default. Learn more.

@@ -17,7 +17,7 @@ query = []
app_units = "0.5.6"
bincode = "0.9"
byteorder = "1.0"
euclid = "0.15.2"
euclid = "0.15.5"
fxhash = "0.2.1"
gleam = "0.4.8"
lazy_static = "0.2"
@@ -555,7 +555,7 @@ impl BorderCornerClipSource {
BorderCornerClipKind::Dot => {
// The centers of dots follow an ellipse along the middle of the
// border radius.
let inner_radius = corner_radius - widths * 0.5;
let inner_radius = (corner_radius - widths * 0.5).abs();
let ellipse = Ellipse::new(inner_radius);

// Allocate a "worst case" number of dot clips. This can be
Binary file not shown.
@@ -0,0 +1,12 @@
---
root:
items:
- bounds: [5, 5, 490, 490]
"clip-rect": [5, 5, 490, 490]
"clip-and-scroll": 0
"backface-visible": true
type: border
width: 25
"border-type": normal
color: black
style: dotted
@@ -13,3 +13,4 @@ fuzzy(255,24) == border-ridge-simple.yaml border-ridge-simple-ref.yaml
== border-image-crash.yaml border-image-crash-ref.yaml
== border-image-fill.yaml border-image-fill-ref.png
== border-no-bogus-line.yaml border-no-bogus-line-ref.png
== dotted-corner-small-radius.yaml dotted-corner-small-radius.png
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.