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

Improvements to gradients. #16666

Merged
merged 7 commits into from May 7, 2017

Correct virtual gradient ray length of radial gradients.

The length should be the horizontal radius and not the
hypotenuse.
  • Loading branch information
pyfisch committed May 1, 2017
commit 4f17b17082a1a72c8f9470f22f8018f1cb0e41ab
@@ -1167,9 +1167,8 @@ impl FragmentDisplayListBuilding for Fragment {
EndingShape::Ellipse(LengthOrPercentageOrKeyword::Keyword(word))
=> convert_ellipse_size_keyword(word, &bounds.size, &center),
};
let length = Au::from_f32_px(radius.width.to_f32_px().hypot(radius.height.to_f32_px()));

let mut stops = convert_gradient_stops(stops, length, style);
let mut stops = convert_gradient_stops(stops, radius.width, style);
if !repeating {
fix_gradient_stops(&mut stops);
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.