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
|
|
|
|
|
|
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 {
|
|
|
|
|
public:
|
2020-10-02 20:57:28 +01:00
|
|
|
using WrapperType = Bindings::SVGGraphicsElementWrapper;
|
|
|
|
|
|
2021-02-07 11:20:15 +01:00
|
|
|
SVGGraphicsElement(DOM::Document&, QualifiedName);
|
2020-07-19 23:01:53 -07:00
|
|
|
|
2020-07-23 09:44:42 -07:00
|
|
|
virtual void parse_attribute(const FlyString& name, const String& value) override;
|
2020-07-19 23:01:53 -07:00
|
|
|
|
2020-10-05 16:14:36 -07:00
|
|
|
const Optional<Gfx::Color>& fill_color() const { return m_fill_color; }
|
|
|
|
|
const Optional<Gfx::Color>& stroke_color() const { return m_stroke_color; }
|
|
|
|
|
const Optional<float>& stroke_width() const { return m_stroke_width; }
|
2020-07-19 23:01:53 -07:00
|
|
|
|
2020-07-23 09:44:42 -07:00
|
|
|
protected:
|
|
|
|
|
Optional<Gfx::Color> m_fill_color;
|
|
|
|
|
Optional<Gfx::Color> m_stroke_color;
|
2020-07-19 23:01:53 -07:00
|
|
|
Optional<float> m_stroke_width;
|
|
|
|
|
};
|
|
|
|
|
|
2020-07-23 09:44:42 -07:00
|
|
|
}
|