mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09: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
Notes:
sideshowbarker
2024-07-16 23:03:06 +09:00
Author: https://github.com/MacDue
Commit: 9b652842e4
Pull-request: https://github.com/SerenityOS/serenity/pull/18617
Reviewed-by: https://github.com/gmta
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