mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
LibWeb: Add an initial implementation of SVG <radialGradient>
This follows on from the SVG linear gradients. It supports the same features (xlink:href, gradientUnits, gradientTransform). With this commit I have now implemented all web gradients :^) (Though we are still missing a few parameters for SVG gradients, e.g. spreadMethod).
This commit is contained in:
parent
2826bd2b45
commit
9b652842e4
6 changed files with 289 additions and 0 deletions
|
@ -92,6 +92,7 @@
|
|||
#include <LibWeb/SVG/SVGPathElement.h>
|
||||
#include <LibWeb/SVG/SVGPolygonElement.h>
|
||||
#include <LibWeb/SVG/SVGPolylineElement.h>
|
||||
#include <LibWeb/SVG/SVGRadialGradientElement.h>
|
||||
#include <LibWeb/SVG/SVGRectElement.h>
|
||||
#include <LibWeb/SVG/SVGSVGElement.h>
|
||||
#include <LibWeb/SVG/SVGStopElement.h>
|
||||
|
@ -441,6 +442,8 @@ static WebIDL::ExceptionOr<JS::GCPtr<SVG::SVGElement>> create_svg_element(JS::Re
|
|||
return MUST_OR_THROW_OOM(realm.heap().allocate<SVG::SVGPolygonElement>(realm, document, move(qualified_name)));
|
||||
if (local_name == SVG::TagNames::polyline)
|
||||
return MUST_OR_THROW_OOM(realm.heap().allocate<SVG::SVGPolylineElement>(realm, document, move(qualified_name)));
|
||||
if (local_name == SVG::TagNames::radialGradient)
|
||||
return MUST_OR_THROW_OOM(realm.heap().allocate<SVG::SVGRadialGradientElement>(realm, document, move(qualified_name)));
|
||||
if (local_name == SVG::TagNames::rect)
|
||||
return MUST_OR_THROW_OOM(realm.heap().allocate<SVG::SVGRectElement>(realm, document, move(qualified_name)));
|
||||
if (local_name == SVG::TagNames::g)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue