summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/SVG
diff options
context:
space:
mode:
authorMacDue <macdue@dueutil.tech>2023-04-10 12:34:39 +0100
committerAndreas Kling <kling@serenityos.org>2023-04-12 07:40:22 +0200
commitd0496ae9b8cd00c619cf76366b4b8b5c5b3a241e (patch)
treef5ca57655ee9622007dd2a6d63dfb97a675d23d9 /Userland/Libraries/LibWeb/SVG
parentcf23a2b82d5c7c4c219ac9074a3e715a92baedb0 (diff)
downloadserenity-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.h6
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;
};