SVGGraphicsElement.h 862 B

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