mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
LibWeb: Delete create_gfx_paint_style() for SVG gradients
No longer used after switching to Skia.
This commit is contained in:
parent
2a55ab13ef
commit
8164be7ac8
Notes:
github-actions[bot]
2024-07-29 15:25:56 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/8164be7ac8d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/885 Reviewed-by: https://github.com/AtkinsSJ ✅
2 changed files with 0 additions and 52 deletions
|
@ -22,50 +22,4 @@ void SVGGradientPaintStyle::set_gradient_transform(Gfx::AffineTransform transfor
|
|||
}
|
||||
}
|
||||
|
||||
NonnullRefPtr<Gfx::SVGGradientPaintStyle> SVGLinearGradientPaintStyle::create_gfx_paint_style() const
|
||||
{
|
||||
auto gfx_paint_style = adopt_ref(*new Gfx::SVGLinearGradientPaintStyle(m_start_point, m_end_point));
|
||||
|
||||
Vector<Gfx::ColorStop> color_stops;
|
||||
for (auto const& color_stop : m_color_stops)
|
||||
color_stops.append({ color_stop.color, color_stop.position, color_stop.transition_hint });
|
||||
gfx_paint_style->set_color_stops(move(color_stops));
|
||||
|
||||
if (m_repeat_length.has_value())
|
||||
gfx_paint_style->set_repeat_length(*m_repeat_length);
|
||||
|
||||
if (m_inverse_transform.has_value())
|
||||
gfx_paint_style->set_inverse_transform(*m_inverse_transform);
|
||||
|
||||
gfx_paint_style->set_scale(m_scale);
|
||||
|
||||
auto spread_method = static_cast<Gfx::SVGGradientPaintStyle::SpreadMethod>(to_underlying(m_spread_method));
|
||||
gfx_paint_style->set_spread_method(spread_method);
|
||||
|
||||
return gfx_paint_style;
|
||||
}
|
||||
|
||||
NonnullRefPtr<Gfx::SVGGradientPaintStyle> SVGRadialGradientPaintStyle::create_gfx_paint_style() const
|
||||
{
|
||||
auto gfx_paint_style = adopt_ref(*new Gfx::SVGRadialGradientPaintStyle(m_start_center, m_start_radius, m_end_center, m_end_radius));
|
||||
|
||||
Vector<Gfx::ColorStop> color_stops;
|
||||
for (auto const& color_stop : m_color_stops)
|
||||
color_stops.append({ color_stop.color, color_stop.position, color_stop.transition_hint });
|
||||
gfx_paint_style->set_color_stops(move(color_stops));
|
||||
|
||||
if (m_repeat_length.has_value())
|
||||
gfx_paint_style->set_repeat_length(*m_repeat_length);
|
||||
|
||||
if (m_inverse_transform.has_value())
|
||||
gfx_paint_style->set_inverse_transform(*m_inverse_transform);
|
||||
|
||||
gfx_paint_style->set_scale(m_scale);
|
||||
|
||||
auto spread_method = static_cast<Gfx::SVGGradientPaintStyle::SpreadMethod>(to_underlying(m_spread_method));
|
||||
gfx_paint_style->set_spread_method(spread_method);
|
||||
|
||||
return gfx_paint_style;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,8 +20,6 @@ struct ColorStop {
|
|||
|
||||
class SVGGradientPaintStyle : public RefCounted<SVGGradientPaintStyle> {
|
||||
public:
|
||||
virtual NonnullRefPtr<Gfx::SVGGradientPaintStyle> create_gfx_paint_style() const { VERIFY_NOT_REACHED(); }
|
||||
|
||||
void set_gradient_transform(Gfx::AffineTransform transform);
|
||||
|
||||
enum class SpreadMethod {
|
||||
|
@ -71,8 +69,6 @@ public:
|
|||
return adopt_ref(*new SVGLinearGradientPaintStyle(start_point, end_point));
|
||||
}
|
||||
|
||||
NonnullRefPtr<Gfx::SVGGradientPaintStyle> create_gfx_paint_style() const override;
|
||||
|
||||
Gfx::FloatPoint start_point() const { return m_start_point; }
|
||||
Gfx::FloatPoint end_point() const { return m_end_point; }
|
||||
|
||||
|
@ -97,8 +93,6 @@ public:
|
|||
return adopt_ref(*new SVGRadialGradientPaintStyle(start_center, start_radius, end_center, end_radius));
|
||||
}
|
||||
|
||||
NonnullRefPtr<Gfx::SVGGradientPaintStyle> create_gfx_paint_style() const override;
|
||||
|
||||
Gfx::FloatPoint start_center() const { return m_start_center; }
|
||||
float start_radius() const { return m_start_radius; }
|
||||
Gfx::FloatPoint end_center() const { return m_end_center; }
|
||||
|
|
Loading…
Reference in a new issue