mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:17:35 +00:00
LibWeb: Resolve and paint simple SVG masks
This allows applying SVG <mask>s to elements. It is only implemented for the simplest (and default) case: - mask-type = luminance - maskContentUnits = maskContentUnits - maskUnits = objectBoundingBox - Default masking area It should be possible to extend to cover more cases. Though the layout for maskContentUnits = objectBoundingBox will be tricky to figure out.
This commit is contained in:
parent
650180811e
commit
909bcfe9a4
12 changed files with 123 additions and 17 deletions
|
@ -34,6 +34,16 @@ public:
|
|||
bool has_focus() const { return m_focus; }
|
||||
void set_has_focus(bool focus) { m_focus = focus; }
|
||||
|
||||
void set_svg_transform(Gfx::AffineTransform transform)
|
||||
{
|
||||
m_svg_transform = transform;
|
||||
}
|
||||
|
||||
Gfx::AffineTransform const& svg_transform() const
|
||||
{
|
||||
return m_svg_transform;
|
||||
}
|
||||
|
||||
DevicePixels enclosing_device_pixels(CSSPixels css_pixels) const;
|
||||
DevicePixels floored_device_pixels(CSSPixels css_pixels) const;
|
||||
DevicePixels rounded_device_pixels(CSSPixels css_pixels) const;
|
||||
|
@ -70,6 +80,7 @@ private:
|
|||
bool m_should_show_line_box_borders { false };
|
||||
bool m_focus { false };
|
||||
CSSPixelPoint m_scroll_offset;
|
||||
Gfx::AffineTransform m_svg_transform;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue