2020-07-19 23:01:53 -07:00
|
|
|
/*
|
2021-04-22 16:53:07 -07:00
|
|
|
* Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
|
2020-07-19 23:01:53 -07:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-07-19 23:01:53 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2025-07-17 15:04:25 +01:00
|
|
|
#include <LibWeb/SVG/Path.h>
|
2020-07-23 09:44:42 -07:00
|
|
|
#include <LibWeb/SVG/SVGGeometryElement.h>
|
2020-07-19 23:01:53 -07:00
|
|
|
|
2020-07-23 09:44:42 -07:00
|
|
|
namespace Web::SVG {
|
2020-07-19 23:01:53 -07:00
|
|
|
|
2020-07-23 09:44:42 -07:00
|
|
|
class SVGPathElement final : public SVGGeometryElement {
|
2022-08-28 13:42:07 +02:00
|
|
|
WEB_PLATFORM_OBJECT(SVGPathElement, SVGGeometryElement);
|
2024-11-15 04:01:23 +13:00
|
|
|
GC_DECLARE_ALLOCATOR(SVGPathElement);
|
2020-10-02 20:57:28 +01:00
|
|
|
|
2022-08-28 13:42:07 +02:00
|
|
|
public:
|
2020-07-23 09:44:42 -07:00
|
|
|
virtual ~SVGPathElement() override = default;
|
2020-07-19 23:01:53 -07:00
|
|
|
|
2024-11-14 08:14:16 -05:00
|
|
|
virtual void attribute_changed(FlyString const& name, Optional<String> const& old_value, Optional<String> const& value, Optional<FlyString> const& namespace_) override;
|
2020-10-05 16:14:36 -07:00
|
|
|
|
2024-08-09 14:00:10 +02:00
|
|
|
virtual Gfx::Path get_path(CSSPixelSize viewport_size) override;
|
2020-07-19 23:01:53 -07:00
|
|
|
|
|
|
|
private:
|
2022-08-28 13:42:07 +02:00
|
|
|
SVGPathElement(DOM::Document&, DOM::QualifiedName);
|
|
|
|
|
2023-08-07 08:41:28 +02:00
|
|
|
virtual void initialize(JS::Realm&) override;
|
2023-01-10 06:28:20 -05:00
|
|
|
|
2025-07-17 15:04:25 +01:00
|
|
|
Path m_path {};
|
2020-07-19 23:01:53 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|