Clip.cpp 484 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2022, the SerenityOS developers.
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include "Clip.h"
  7. namespace Web::CSS {
  8. Clip::Clip(Type type, EdgeRect edge_rect)
  9. : m_type(type)
  10. , m_edge_rect(edge_rect)
  11. {
  12. }
  13. Clip::Clip(EdgeRect edge_rect)
  14. : m_type(Type::Rect)
  15. , m_edge_rect(edge_rect)
  16. {
  17. }
  18. Clip Clip::make_auto()
  19. {
  20. return Clip(Type::Auto, EdgeRect { Length::make_auto(), Length::make_auto(), Length::make_auto(), Length::make_auto() });
  21. }
  22. }