mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
LibWeb: Resolve and paint SVG gradient fills
This bit is mostly ad-hoc for now. This simply turns fill: url(#grad1) into document().get_element_by_id('grad1') then resolves the gradient. This seems to do the trick for most use cases, but this is not attempting to follow the spec yet to keep things simple.
This commit is contained in:
parent
aa3464466e
commit
afd355c135
6 changed files with 97 additions and 17 deletions
|
@ -7,10 +7,12 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibGfx/PaintStyle.h>
|
||||
#include <LibGfx/Path.h>
|
||||
#include <LibWeb/DOM/Node.h>
|
||||
#include <LibWeb/SVG/AttributeParser.h>
|
||||
#include <LibWeb/SVG/SVGElement.h>
|
||||
#include <LibWeb/SVG/SVGGradientElement.h>
|
||||
#include <LibWeb/SVG/TagNames.h>
|
||||
|
||||
namespace Web::SVG {
|
||||
|
@ -37,6 +39,8 @@ public:
|
|||
|
||||
Gfx::AffineTransform get_transform() const;
|
||||
|
||||
Optional<Gfx::PaintStyle const&> fill_paint_style(SVGPaintContext const&) const;
|
||||
|
||||
protected:
|
||||
SVGGraphicsElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue