2020-07-19 23:01:53 -07:00
|
|
|
/*
|
2021-04-22 16:53:07 -07:00
|
|
|
* Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
|
2022-01-24 15:43:44 +00:00
|
|
|
* Copyright (c) 2021-2022, Sam Atkins <atkinssj@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
|
|
|
|
|
|
2020-07-23 09:44:42 -07:00
|
|
|
#include <LibGfx/Path.h>
|
|
|
|
|
#include <LibWeb/DOM/Node.h>
|
|
|
|
|
#include <LibWeb/SVG/SVGElement.h>
|
|
|
|
|
#include <LibWeb/SVG/TagNames.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 SVGGraphicsElement : public SVGElement {
|
2022-08-28 13:42:07 +02:00
|
|
|
WEB_PLATFORM_OBJECT(SVGGraphicsElement, SVGElement);
|
2020-07-19 23:01:53 -07:00
|
|
|
|
2022-08-28 13:42:07 +02:00
|
|
|
public:
|
2022-01-24 15:43:44 +00:00
|
|
|
virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
|
2020-07-19 23:01:53 -07:00
|
|
|
|
2021-09-16 12:28:14 +01:00
|
|
|
Optional<Gfx::Color> fill_color() const;
|
|
|
|
|
Optional<Gfx::Color> stroke_color() const;
|
|
|
|
|
Optional<float> stroke_width() const;
|
2022-08-28 13:42:07 +02:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
SVGGraphicsElement(DOM::Document&, DOM::QualifiedName);
|
2023-01-10 06:28:20 -05:00
|
|
|
|
2023-01-28 12:33:35 -05:00
|
|
|
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
2020-07-19 23:01:53 -07:00
|
|
|
};
|
|
|
|
|
|
2020-07-23 09:44:42 -07:00
|
|
|
}
|