diff options
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibWeb/SVG/SVGGeometryElement.cpp | 11 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/SVG/SVGGeometryElement.h | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/SVG/SVGGeometryElement.idl | 4 |
3 files changed, 19 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.cpp index 6a038af830..40c035ebed 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.cpp @@ -19,4 +19,15 @@ RefPtr<Layout::Node> SVGGeometryElement::create_layout_node(NonnullRefPtr<CSS::S return adopt_ref(*new Layout::SVGGeometryBox(document(), *this, move(style))); } +float SVGGeometryElement::get_total_length() +{ + return 0; +} + +NonnullRefPtr<Geometry::DOMPoint> SVGGeometryElement::get_point_at_length(float distance) +{ + (void)distance; + return Geometry::DOMPoint::create(0, 0, 0, 0); +} + } diff --git a/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.h b/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.h index 394f927863..dc52eb7d68 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.h +++ b/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.h @@ -6,6 +6,7 @@ #pragma once +#include <LibWeb/Geometry/DOMPoint.h> #include <LibWeb/SVG/SVGGraphicsElement.h> namespace Web::SVG { @@ -19,6 +20,9 @@ public: virtual Gfx::Path& get_path() = 0; + float get_total_length(); + NonnullRefPtr<Geometry::DOMPoint> get_point_at_length(float distance); + protected: SVGGeometryElement(DOM::Document& document, DOM::QualifiedName qualified_name); }; diff --git a/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.idl b/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.idl index 437cc278eb..047fddf84c 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.idl +++ b/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.idl @@ -1,5 +1,9 @@ +#import <Geometry/DOMPoint.idl> #import <SVG/SVGGraphicsElement.idl> interface SVGGeometryElement : SVGGraphicsElement { + float getTotalLength(); + DOMPoint getPointAtLength(float distance); + }; |