1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 23:07:35 +00:00

LibWeb: Fix passing size/position to paint_radial_gradient()

This was wrong twice making it right... But let's fix that.

The center was being passed as a DevicePixelPoint, but was in fact in
CSS pixels, the size was passed as a Gfx::FloatSize but was in
CSS pixels again. Then we were scaling from device pixels to CSS pixels
when painting which does not need to be done if everything is passed
which the correct scale factors already applied.
This commit is contained in:
MacDue 2022-12-17 20:04:39 +00:00 committed by Andreas Kling
parent 6c27f2c071
commit a9ea0ee9af
3 changed files with 9 additions and 7 deletions

View file

@ -47,6 +47,6 @@ RadialGradientData resolve_radial_gradient_data(Layout::Node const&, CSSPixelSiz
void paint_linear_gradient(PaintContext&, DevicePixelRect const&, LinearGradientData const&);
void paint_conic_gradient(PaintContext&, DevicePixelRect const&, ConicGradientData const&, DevicePixelPoint position);
void paint_radial_gradient(PaintContext&, DevicePixelRect const&, RadialGradientData const&, DevicePixelPoint position, Gfx::FloatSize size);
void paint_radial_gradient(PaintContext&, DevicePixelRect const&, RadialGradientData const&, DevicePixelPoint position, DevicePixelSize size);
}