mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +00:00
LibWeb: Apply SVG transform to path when painting (SVG) elements
This also combines the viewbox mapping into the same transform and reuses some code by using Path::copy_transformed() rather than manually mapping each segment of the path.
This commit is contained in:
parent
3484db0dc1
commit
cf23a2b82d
3 changed files with 27 additions and 67 deletions
|
@ -21,12 +21,13 @@ public:
|
|||
SVG::SVGGeometryElement& dom_node() { return static_cast<SVG::SVGGeometryElement&>(SVGGraphicsBox::dom_node()); }
|
||||
SVG::SVGGeometryElement const& dom_node() const { return static_cast<SVG::SVGGeometryElement const&>(SVGGraphicsBox::dom_node()); }
|
||||
|
||||
float viewbox_scaling() const;
|
||||
CSSPixelPoint viewbox_origin() const;
|
||||
Gfx::AffineTransform layout_transform() const;
|
||||
|
||||
virtual JS::GCPtr<Painting::Paintable> create_paintable() const override;
|
||||
|
||||
private:
|
||||
CSSPixelPoint viewbox_origin() const;
|
||||
|
||||
virtual bool is_svg_geometry_box() const final { return true; }
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue