Flutter Engine
The Flutter Engine
size_conversions.cc
Go to the documentation of this file.
1// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "size_conversions.h"
6
8
9namespace gfx {
10
12 return Size(base::ClampFloor(size.width()), base::ClampFloor(size.height()));
13}
14
16 return Size(base::ClampCeil(size.width()), base::ClampCeil(size.height()));
17}
18
20 return Size(base::ClampRound(size.width()), base::ClampRound(size.height()));
21}
22
23} // namespace gfx
Definition: size.h:26
Dst ClampFloor(Src value)
Dst ClampCeil(Src value)
Dst ClampRound(Src value)
Definition: insets.cc:10
Size ToFlooredSize(const SizeF &size)
Size ToCeiledSize(const SizeF &size)
constexpr size_t size(const T(&array)[N]) noexcept
Size ToRoundedSize(const SizeF &size)
TSize< Scalar > Size
Definition: size.h:137