12#include <CoreGraphics/CoreGraphics.h>
13#elif defined(OS_APPLE)
14#include <ApplicationServices/ApplicationServices.h>
27 : origin_(r.
left, r.top),
29#elif defined(OS_APPLE)
35RECT Rect::ToRECT()
const {
43#elif defined(OS_APPLE)
44CGRect Rect::ToCGRect()
const {
51 if (*origin < dst_origin)
70 int effective_span = base::ClampSub(
max,
min);
71 int span_loss = base::ClampSub(
max,
min + effective_span);
76 *span = effective_span;
87 *span = effective_span;
88 *origin =
max - effective_span;
91 *span = effective_span;
95 *span = effective_span;
96 *origin =
min + span_loss / 2;
122 origin_ +=
Vector2d(horizontal, vertical);
145 if (origin_ == other.origin_) {
152 return origin_ < other.origin_;
157 return (point_x >=
x()) && (point_x <
right()) && (point_y >=
y()) &&
182 if (left >= new_right || top >= new_bottom) {
206 if (
rect.Contains(*
this)) {
218 if (
rect.x() <=
x()) {
225 if (
rect.y() <=
y()) {
237 int new_width =
width();
238 int new_height =
height();
241 SetRect(new_x, new_y, new_width, new_height);
251 int new_x =
x() + (
width() - new_width) / 2;
252 int new_y =
y() + (
height() - new_height) / 2;
253 SetRect(new_x, new_y, new_width, new_height);
282 return x_distance + y_distance;
static bool right(const SkPoint &p0, const SkPoint &p1)
constexpr int right() const
constexpr int bottom() const
constexpr int top() const
constexpr int left() const
void SetPoint(int x, int y)
bool Intersects(const Rect &rect) const
bool ApproximatelyEqual(const Rect &rect, int tolerance) const
constexpr int height() const
int ManhattanDistanceToPoint(const Point &point) const
Insets InsetsFrom(const Rect &inner) const
Point CenterPoint() const
void operator+=(const Vector2d &offset)
void set_width(int width)
void Offset(int horizontal, int vertical)
void SetByBounds(int left, int top, int right, int bottom)
void Intersect(const Rect &rect)
bool operator<(const Rect &other) const
void AdjustToFit(const Rect &rect)
constexpr int right() const
constexpr const Point & origin() const
constexpr int bottom() const
bool SharesEdgeWith(const Rect &rect) const
void Subtract(const Rect &rect)
void set_height(int height)
std::string ToString() const
constexpr const Size & size() const
void operator-=(const Vector2d &offset)
void Inset(int horizontal, int vertical)
void SetRect(int x, int y, int width, int height)
bool Contains(int point_x, int point_y) const
int ManhattanInternalDistance(const Rect &rect) const
void Union(const Rect &rect)
void ClampToCenteredSize(const Size &size)
void SplitVertically(Rect *left_half, Rect *right_half) const
constexpr int width() const
constexpr int height() const
void SetSize(int width, int height)
constexpr int width() const
static float max(float r, float g, float b)
static float min(float r, float g, float b)
sk_sp< SkBlender > blender SkRect rect
constexpr std::make_unsigned< T >::type SafeUnsignedAbs(T value)
std::string StringPrintf(const std::string &format, Args... args)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Rect BoundingRect(const Point &p1, const Point &p2)
void AdjustAlongAxis(int dst_origin, int dst_size, int *origin, int *size)
Rect IntersectRects(const Rect &a, const Rect &b)
Insets operator+(Insets lhs, const Insets &rhs)
Rect UnionRects(const Rect &a, const Rect &b)
Rect SubtractRects(const Rect &a, const Rect &b)
static void SaturatedClampRange(int min, int max, int *origin, int *span)
Insets operator-(Insets lhs, const Insets &rhs)
constexpr size_t size(const T(&array)[N]) noexcept
SIN Vec< N, float > abs(const Vec< N, float > &x)
#define BASE_DCHECK(condition)