diff options
author | MacDue <macdue@dueutil.tech> | 2023-04-10 12:34:39 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-12 07:40:22 +0200 |
commit | d0496ae9b8cd00c619cf76366b4b8b5c5b3a241e (patch) | |
tree | f5ca57655ee9622007dd2a6d63dfb97a675d23d9 /Userland/Libraries/LibWeb/SVG | |
parent | cf23a2b82d5c7c4c219ac9074a3e715a92baedb0 (diff) | |
download | serenity-d0496ae9b8cd00c619cf76366b4b8b5c5b3a241e.zip |
LibWeb: Apply CSS scaling to SVG elements
Not sure why this was not done before, not now it works easily :^)
Diffstat (limited to 'Userland/Libraries/LibWeb/SVG')
-rw-r--r-- | Userland/Libraries/LibWeb/SVG/SVGContext.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/SVG/SVGContext.h b/Userland/Libraries/LibWeb/SVG/SVGContext.h index f3bca5cb74..6c184cbdc9 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGContext.h +++ b/Userland/Libraries/LibWeb/SVG/SVGContext.h @@ -14,7 +14,7 @@ namespace Web { class SVGContext { public: - SVGContext(Gfx::FloatRect svg_element_bounds) + SVGContext(CSSPixelRect svg_element_bounds) : m_svg_element_bounds(svg_element_bounds) { m_states.append(State()); @@ -28,7 +28,7 @@ public: void set_stroke_color(Gfx::Color color) { state().stroke_color = color; } void set_stroke_width(float width) { state().stroke_width = width; } - Gfx::FloatPoint svg_element_position() const { return m_svg_element_bounds.top_left(); } + CSSPixelPoint svg_element_position() const { return m_svg_element_bounds.top_left(); } void save() { m_states.append(m_states.last()); } void restore() { m_states.take_last(); } @@ -43,7 +43,7 @@ private: State const& state() const { return m_states.last(); } State& state() { return m_states.last(); } - Gfx::FloatRect m_svg_element_bounds; + CSSPixelRect m_svg_element_bounds; Vector<State> m_states; }; |