mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +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:
@@ -2178,7 +2178,9 @@ bool RadialGradientStyleValue::equals(StyleValue const& other) const
|
||||
void RadialGradientStyleValue::paint(PaintContext& context, Gfx::IntRect const& dest_rect, CSS::ImageRendering) const
|
||||
{
|
||||
VERIFY(m_resolved.has_value());
|
||||
Painting::paint_radial_gradient(context, dest_rect.to_type<DevicePixels>(), m_resolved->data, m_resolved->center.to_rounded<DevicePixels>(), m_resolved->gradient_size);
|
||||
Painting::paint_radial_gradient(context, dest_rect.to_type<DevicePixels>(), m_resolved->data,
|
||||
context.rounded_device_point(m_resolved->center.to_type<CSSPixels>()),
|
||||
context.rounded_device_size(m_resolved->gradient_size.to_type<CSSPixels>()));
|
||||
}
|
||||
|
||||
DeprecatedString ConicGradientStyleValue::to_deprecated_string() const
|
||||
|
||||
Reference in New Issue
Block a user