SVGEllipseElement.h 982 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/SVG/SVGAnimatedLength.h>
  8. #include <LibWeb/SVG/SVGGeometryElement.h>
  9. namespace Web::SVG {
  10. class SVGEllipseElement final : public SVGGeometryElement {
  11. public:
  12. using WrapperType = Bindings::SVGEllipseElementWrapper;
  13. SVGEllipseElement(DOM::Document&, DOM::QualifiedName);
  14. virtual ~SVGEllipseElement() override = default;
  15. virtual void parse_attribute(FlyString const& name, String const& value) override;
  16. virtual Gfx::Path& get_path() override;
  17. NonnullRefPtr<SVGAnimatedLength> cx() const;
  18. NonnullRefPtr<SVGAnimatedLength> cy() const;
  19. NonnullRefPtr<SVGAnimatedLength> rx() const;
  20. NonnullRefPtr<SVGAnimatedLength> ry() const;
  21. private:
  22. Optional<Gfx::Path> m_path;
  23. Optional<float> m_center_x;
  24. Optional<float> m_center_y;
  25. Optional<float> m_radius_x;
  26. Optional<float> m_radius_y;
  27. };
  28. }