diff --git a/Userland/Libraries/LibWeb/Painting/PaintStyle.cpp b/Userland/Libraries/LibWeb/Painting/PaintStyle.cpp index 19bc02f1a96..a5ebecc8763 100644 --- a/Userland/Libraries/LibWeb/Painting/PaintStyle.cpp +++ b/Userland/Libraries/LibWeb/Painting/PaintStyle.cpp @@ -22,50 +22,4 @@ void SVGGradientPaintStyle::set_gradient_transform(Gfx::AffineTransform transfor } } -NonnullRefPtr SVGLinearGradientPaintStyle::create_gfx_paint_style() const -{ - auto gfx_paint_style = adopt_ref(*new Gfx::SVGLinearGradientPaintStyle(m_start_point, m_end_point)); - - Vector 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(to_underlying(m_spread_method)); - gfx_paint_style->set_spread_method(spread_method); - - return gfx_paint_style; -} - -NonnullRefPtr 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 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(to_underlying(m_spread_method)); - gfx_paint_style->set_spread_method(spread_method); - - return gfx_paint_style; -} - } diff --git a/Userland/Libraries/LibWeb/Painting/PaintStyle.h b/Userland/Libraries/LibWeb/Painting/PaintStyle.h index 1b0863d2882..0a3aae9bd17 100644 --- a/Userland/Libraries/LibWeb/Painting/PaintStyle.h +++ b/Userland/Libraries/LibWeb/Painting/PaintStyle.h @@ -20,8 +20,6 @@ struct ColorStop { class SVGGradientPaintStyle : public RefCounted { public: - virtual NonnullRefPtr 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 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 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; }