summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/Clip.cpp
blob: bf73c238fce5c4cdd180e3542f16d3c5bbf799fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * Copyright (c) 2022, the SerenityOS developers.
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include "Clip.h"
#include <LibWeb/CSS/StyleValue.h>

namespace Web::CSS {

Clip::Clip(Type type, EdgeRect edge_rect)
    : m_type(type)
    , m_edge_rect(edge_rect)
{
}

Clip::Clip(EdgeRect edge_rect)
    : m_type(Type::Rect)
    , m_edge_rect(edge_rect)
{
}

Clip Clip::make_auto()
{
    return Clip(Type::Auto, EdgeRect { Length::make_auto(), Length::make_auto(), Length::make_auto(), Length::make_auto() });
}

}