SVGGraphicsElement.h 899 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibGfx/Path.h>
  8. #include <LibWeb/DOM/Node.h>
  9. #include <LibWeb/SVG/SVGElement.h>
  10. #include <LibWeb/SVG/TagNames.h>
  11. namespace Web::SVG {
  12. class SVGGraphicsElement : public SVGElement {
  13. public:
  14. using WrapperType = Bindings::SVGGraphicsElementWrapper;
  15. SVGGraphicsElement(DOM::Document&, QualifiedName);
  16. virtual void parse_attribute(const FlyString& name, const String& value) override;
  17. const Optional<Gfx::Color>& fill_color() const { return m_fill_color; }
  18. const Optional<Gfx::Color>& stroke_color() const { return m_stroke_color; }
  19. const Optional<float>& stroke_width() const { return m_stroke_width; }
  20. protected:
  21. Optional<Gfx::Color> m_fill_color;
  22. Optional<Gfx::Color> m_stroke_color;
  23. Optional<float> m_stroke_width;
  24. };
  25. }