 |
Flutter Impeller
|
|
Go to the documentation of this file.
38 return TSize{std::numeric_limits<Type>::max(),
39 std::numeric_limits<Type>::max()};
114 constexpr
size_t minimum_mip = 1u;
118 size_t result = std::max(ceil(log2(
width)), ceil(log2(
height)));
119 return std::max(result, minimum_mip);
125 template <
class T,
class U,
class = std::enable_if_t<std::is_arithmetic_v<U>>>
130 template <
class T,
class U,
class = std::enable_if_t<std::is_arithmetic_v<U>>>
132 return {
static_cast<T
>(s) / p.x,
static_cast<T
>(s) / p.y};
138 static_assert(
sizeof(
Size) == 2 *
sizeof(
Scalar));
constexpr TSize operator/(Scalar scale) const
constexpr bool operator==(const TSize &s) const
constexpr TSize Ceil() const
constexpr TSize Min(const TSize &o) const
std::ostream & operator<<(std::ostream &out, const impeller::Color &c)
constexpr Color operator*(T value, const Color &c)
constexpr TSize operator+(const TSize &s) const
constexpr TSize Round() const
constexpr bool IsNegative() const
constexpr TSize(const TSize< U > &other)
constexpr TSize Max(const TSize &o) const
constexpr TSize Abs() const
constexpr bool IsZero() const
constexpr TSize operator/(const TSize &s) const
constexpr bool operator!=(const TSize &s) const
static constexpr TSize Ceil(const TSize< U > &other)
constexpr Type Area() const
constexpr Color operator/(T value, const Color &c)
static constexpr TSize Infinite()
constexpr bool IsEmpty() const
constexpr bool IsPositive() const
constexpr size_t MipCount() const
constexpr TSize Floor() const
static constexpr TSize MakeWH(Type width, Type height)
constexpr TSize operator-(const TSize &s) const
constexpr TSize(Type width, Type height)
constexpr TSize operator*(Scalar scale) const