mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-03 17:02:56 +00:00
LibWeb: Apply the paint transformation in SVGGradientElement
In commit 1b82cb43c2
I accidentally
removed the paint transformation altogether. The result was that
zoomed-in SVGs, or SVG elements with a transformation applied could have
their gradient coordinates misplaced significantly.
This was also exposed in the `svg-text-effects` test by way of a slight
visual difference. Add a new test that very clearly exposes the fixed
issue by rotating the gradient coordinates by 45 degrees.
This commit is contained in:
parent
e21b5cab32
commit
e5d71a6c82
Notes:
github-actions[bot]
2024-11-15 22:37:58 +00:00
Author: https://github.com/gmta
Commit: e5d71a6c82
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2357
7 changed files with 25 additions and 1 deletions
|
@ -84,7 +84,7 @@ Optional<Gfx::AffineTransform> SVGGradientElement::gradient_transform_impl(HashT
|
|||
// The gradient transform, appropriately scaled and combined with the paint transform.
|
||||
Gfx::AffineTransform SVGGradientElement::gradient_paint_transform(SVGPaintContext const& paint_context) const
|
||||
{
|
||||
Gfx::AffineTransform gradient_paint_transform;
|
||||
Gfx::AffineTransform gradient_paint_transform = paint_context.paint_transform;
|
||||
auto const& bounding_box = paint_context.path_bounding_box;
|
||||
|
||||
if (gradient_units() == SVGUnits::ObjectBoundingBox) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue