17#include <CoreGraphics/CoreGraphics.h>
18#elif defined(OS_APPLE)
19#include <ApplicationServices/ApplicationServices.h>
29 if (*origin < dst_origin)
39CGRect RectF::ToCGRect()
const {
48void RectF::Inset(
float left,
float top,
float right,
float bottom) {
54void RectF::Offset(
float horizontal,
float vertical) {
55 origin_ +=
Vector2dF(horizontal, vertical);
72 if (origin_ != other.origin_)
73 return origin_ < other.origin_;
81 return point_x >=
x() && point_x <
right() && point_y >=
y() &&
87 rect.bottom() <= bottom();
106 if (rx >= rr || ry >= rb) {
111 SetRect(rx, ry, rr - rx, rb - ry);
127 SetRect(rx, ry, rr - rx, rb - ry);
131 if (!Intersects(
rect))
133 if (
rect.Contains(*
this)) {
143 if (
rect.y() <=
y() &&
rect.bottom() >= bottom()) {
145 if (
rect.x() <=
x()) {
152 if (
rect.y() <=
y()) {
154 }
else if (
rect.bottom() >= bottom()) {
158 SetRect(rx, ry, rr - rx, rb - ry);
164 float new_width =
width();
165 float new_height =
height();
168 SetRect(new_x, new_y, new_width, new_height);
178 float new_x =
x() + (
width() - new_width) / 2;
179 float new_y =
y() + (
height() - new_height) / 2;
180 SetRect(new_x, new_y, new_width, new_height);
183void RectF::Transpose() {
187void RectF::SplitVertically(
RectF* left_half,
RectF* right_half)
const {
200 (
y() ==
rect.bottom() || bottom() ==
rect.y()));
203float RectF::ManhattanDistanceToPoint(
const PointF& point)
const {
207 std::max<float>(0,
std::max(
y() - point.
y(), point.
y() - bottom()));
209 return x_distance + y_distance;
212float RectF::ManhattanInternalDistance(
const RectF&
rect)
const {
216 static constexpr float kEpsilon = std::numeric_limits<float>::epsilon();
222bool RectF::IsExpressibleAsRect()
const {
223 return base::IsValueInRangeForNumericType<int>(
x()) &&
224 base::IsValueInRangeForNumericType<int>(
y()) &&
225 base::IsValueInRangeForNumericType<int>(
width()) &&
226 base::IsValueInRangeForNumericType<int>(
height()) &&
227 base::IsValueInRangeForNumericType<int>(
right()) &&
228 base::IsValueInRangeForNumericType<int>(bottom());
259 return RectF(rx, ry, rr - rx, rb - ry);
static void Union(SkRegion *rgn, const SkIRect &rect)
static constexpr double kEpsilon
static bool left(const SkPoint &p0, const SkPoint &p1)
static bool right(const SkPoint &p0, const SkPoint &p1)
constexpr float left() const
constexpr float bottom() const
constexpr float top() const
constexpr float right() const
constexpr float x() const
constexpr float y() const
constexpr RectF()=default
constexpr float y() const
constexpr float width() const
constexpr float height() const
void Union(const RectF &rect)
constexpr float right() const
constexpr float bottom() const
void SetRect(float x, float y, float width, float height)
constexpr float x() 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
std::string StringPrintf(const std::string &format, Args... args)
bool Contains(const Container &container, const Value &value)
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
RectF BoundingRect(const PointF &p1, const PointF &p2)
static void AdjustAlongAxis(float dst_origin, float dst_size, float *origin, float *size)
void AdjustAlongAxis(int dst_origin, int dst_size, int *origin, int *size)
RectF SubtractRects(const RectF &a, const RectF &b)
RectF IntersectRects(const RectF &a, const RectF &b)
RectF UnionRects(const RectF &a, const RectF &b)
constexpr size_t size(const T(&array)[N]) noexcept
static std::string ToString(CompilerBackend::Type type)
constexpr bool operator<(const EnumType &lhs, const Mask< EnumType > &rhs)
SINT Vec< N, T > & operator-=(Vec< N, T > &x, const Vec< N, T > &y)
SINT Vec< N, T > & operator+=(Vec< N, T > &x, const Vec< N, T > &y)
bool EMSCRIPTEN_KEEPALIVE IsEmpty(const SkPath &path)
#define BASE_DCHECK(condition)