mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Use viewport-relative position for radial gradient in Skia
Fixes incorrect radial gradient painting caused by passing gradient-rect-relative position when Skia expects viewport-relative.
This commit is contained in:
committed by
Andreas Kling
parent
386e151f96
commit
8a315592cc
@@ -1089,7 +1089,7 @@ CommandResult DisplayListPlayerSkia::paint_radial_gradient(PaintRadialGradient c
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto const& rect = command.rect;
|
auto const& rect = command.rect;
|
||||||
auto center = to_skia_point(command.center);
|
auto center = to_skia_point(command.center.translated(command.rect.location()));
|
||||||
auto radius = command.size.height();
|
auto radius = command.size.height();
|
||||||
auto shader = SkGradientShader::MakeRadial(center, radius, colors.data(), positions.data(), positions.size(), SkTileMode::kClamp, 0);
|
auto shader = SkGradientShader::MakeRadial(center, radius, colors.data(), positions.data(), positions.size(), SkTileMode::kClamp, 0);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user