Clip.cpp 519 B

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