25#include <initializer_list>
81 const uint8_t[],
int verbCount,
82 const SkScalar[],
int conicWeightCount,
86 unsigned startIndex = 0);
98 bool isVolatile =
false);
100 static SkPath Polygon(
const std::initializer_list<SkPoint>& list,
bool isClosed,
102 bool isVolatile =
false) {
103 return Polygon(list.begin(),
SkToInt(list.size()), isClosed, fillType, isVolatile);
107 return Polygon({
a,
b},
false);
255 bool isConvex()
const;
292 bool isArc(
SkArc* arc)
const;
323 bool isEmpty()
const;
333 bool isLastContourClosed()
const;
371 fIsVolatile = isVolatile;
389 static bool IsLineDegenerate(
const SkPoint& p1,
const SkPoint& p2,
bool exact);
402 static bool IsQuadDegenerate(
const SkPoint& p1,
const SkPoint& p2,
403 const SkPoint& p3,
bool exact);
417 static bool IsCubicDegenerate(
const SkPoint& p1,
const SkPoint& p2,
440 int countPoints()
const;
451 SkPoint getPoint(
int index)
const;
472 int countVerbs()
const;
483 int getVerbs(uint8_t verbs[],
int max)
const;
489 size_t approximateBytesUsed()
const;
514 const SkRect& getBounds()
const;
546 SkRect computeTightBounds()
const;
561 bool conservativelyContainsRect(
const SkRect&
rect)
const;
573 void incReserve(
int extraPtCount,
int extraVerbCount = 0,
int extraConicCount = 0);
575#ifdef SK_HIDE_PATH_EDIT_METHODS
595 return this->moveTo(
p.fX,
p.fY);
635 return this->lineTo(
p.fX,
p.fY);
687 return this->quadTo(p1.
fX, p1.
fY, p2.
fX, p2.
fY);
760 return this->conicTo(p1.
fX, p1.
fY, p2.
fX, p2.
fY,
w);
824 return this->cubicTo(p1.
fX, p1.
fY, p2.
fX, p2.
fY, p3.
fX, p3.
fY);
916 return this->arcTo(p1.
fX, p1.
fY, p2.
fX, p2.
fY, radius);
980 return this->arcTo(r.
fX, r.
fY, xAxisRotate, largeArc, sweep, xy.
fX, xy.
fY);
1026#ifdef SK_HIDE_PATH_EDIT_METHODS
1075#ifdef SK_HIDE_PATH_EDIT_METHODS
1107 return this->addRect(
rect,
dir, 0);
1112 return this->addRect({
left, top,
right, bottom},
dir, 0);
1272 return this->addPoly(list.begin(),
SkToInt(list.size()), close);
1275#ifdef SK_HIDE_PATH_EDIT_METHODS
1309 AddPathMode
mode = kAppend_AddPathMode);
1324 return this->addPath(
src,
m,
mode);
1340 AddPathMode
mode = kAppend_AddPathMode);
1369 this->
offset(dx, dy,
this);
1419 bool getLastPt(
SkPoint* lastPt)
const;
1437 this->setLastPt(
p.fX,
p.fY);
1459 uint32_t getSegmentMasks()
const;
1472 kDone_Verb = kClose_Verb + 1
1514 void setPath(
const SkPath&
path,
bool forceClose);
1556 bool isClosedContour()
const;
1560 const uint8_t* fVerbs;
1561 const uint8_t* fVerbStop;
1581 RangeIter() =
default;
1583 : fVerb(verbs), fPoints(
points), fWeights(weights) {
1586 bool operator!=(
const RangeIter& that)
const {
1587 return fVerb != that.fVerb;
1589 bool operator==(
const RangeIter& that)
const {
1590 return fVerb == that.fVerb;
1592 RangeIter& operator++() {
1593 auto verb =
static_cast<SkPathVerb>(*fVerb++);
1594 fPoints += pts_advance_after_verb(verb);
1600 RangeIter operator++(
int) {
1601 RangeIter
copy = *
this;
1608 std::tuple<SkPathVerb, const SkPoint*, const SkScalar*>
operator*()
const {
1613 int backset = pts_backset_for_verb(verb);
1614 SkASSERT(fPoints + backset >= fInitialPoints);
1615 return {verb, fPoints + backset, fWeights};
1618 constexpr static int pts_advance_after_verb(
SkPathVerb verb) {
1629 constexpr static int pts_backset_for_verb(
SkPathVerb verb) {
1640 const uint8_t* fVerb =
nullptr;
1641 const SkPoint* fPoints =
nullptr;
1642 const SkScalar* fWeights =
nullptr;
1674 void setPath(
const SkPath&);
1701 return fConicWeight;
1818 int fLastMoveToIndex;
1819 mutable std::atomic<uint8_t> fConvexity;
1820 mutable std::atomic<uint8_t> fFirstDirection;
1821 uint8_t fFillType : 2;
1822 uint8_t fIsVolatile : 1;
1835 void copyFields(
const SkPath& that);
1837 size_t writeToMemoryAsRRect(
void*
buffer)
const;
1838 size_t readAsRRect(
const void*,
size_t);
1856 inline void injectMoveToIfNeeded();
1858 inline bool hasOnlyMoveTos()
const;
1862 bool isValidImpl()
const;
1867 void validate()
const;
1868 void validateRef()
const;
1872 bool isZeroLengthSincePoint(
int startPtIndex)
const;
1877 bool hasComputedBounds()
const;
1884 SkPath& dirtyAfterEdit();
1901 bool isConvexityAccurate()
const;
1923 const uint8_t verbs[],
1930 friend class SkAutoDisableOvalCheck;
1939 friend class FuzzPath;
static bool rewind(EdgeList *activeEdges, Vertex **current, Vertex *dst, const Comparator &c)
static const int points[]
std::unique_ptr< SkLatticeIter > fIter
static bool isFinite(const SkRect &r)
static float next(float f)
static double interpolate(double A, double B, double t)
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
@ kCubic_SkPathSegmentMask
@ kConic_SkPathSegmentMask
@ kQuad_SkPathSegmentMask
@ kLine_SkPathSegmentMask
static bool SkPathFillType_IsInverse(SkPathFillType ft)
@ kClose
SkPath::RawIter returns 0 points.
@ kCubic
SkPath::RawIter returns 4 points.
@ kConic
SkPath::RawIter returns 3 points + 1 weight.
@ kQuad
SkPath::RawIter returns 3 points.
@ kMove
SkPath::RawIter returns 1 point.
@ kLine
SkPath::RawIter returns 2 points.
static bool left(const SkPoint &p0, const SkPoint &p1)
static bool right(const SkPoint &p0, const SkPoint &p1)
void swap(sk_sp< T > &a, sk_sp< T > &b)
static void copy(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
constexpr int SkToInt(S x)
static constexpr bool SkToBool(const T &x)
constexpr uint8_t SkToU8(S x)
static void dump(const float m[20], SkYUVColorSpace cs, bool rgb2yuv)
static SkMatrix Scale(SkScalar sx, SkScalar sy)
SkScalar conicWeight() const
SkScalar conicWeight() const
RawIter(const SkPath &path)
size_t readFromMemory(const void *buffer, size_t length)
bool isInverseFillType() const
uint32_t getGenerationID() const
SkPath & transform(const SkMatrix &matrix, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes)
SkPath & lineTo(const SkPoint &p)
SkPathFillType getFillType() const
void setFillType(SkPathFillType ft)
SkPath & addPoly(const std::initializer_list< SkPoint > &list, bool close)
SkPath & addRect(const SkRect &rect, SkPathDirection dir=SkPathDirection::kCW)
SkPath & arcTo(const SkPoint p1, const SkPoint p2, SkScalar radius)
friend bool operator!=(const SkPath &a, const SkPath &b)
void toggleInverseFillType()
void updateBoundsCache() const
SkPath & addRect(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom, SkPathDirection dir=SkPathDirection::kCW)
SkPath & offset(SkScalar dx, SkScalar dy)
std::true_type sk_is_trivially_relocatable
SkPath makeScale(SkScalar sx, SkScalar sy)
SkPath & arcTo(const SkPoint r, SkScalar xAxisRotate, ArcSize largeArc, SkPathDirection sweep, const SkPoint xy)
static SkPath Polygon(const std::initializer_list< SkPoint > &list, bool isClosed, SkPathFillType fillType=SkPathFillType::kWinding, bool isVolatile=false)
void setLastPt(const SkPoint &p)
SkPath & setIsVolatile(bool isVolatile)
@ kSmall_ArcSize
smaller of arc pair
@ kLarge_ArcSize
larger of arc pair
SkPath & quadTo(const SkPoint &p1, const SkPoint &p2)
sk_sp< SkData > serialize() const
SkPath & addPath(const SkPath &src, AddPathMode mode=kAppend_AddPathMode)
SkPath & cubicTo(const SkPoint &p1, const SkPoint &p2, const SkPoint &p3)
size_t writeToMemory(void *buffer) const
SkPath & moveTo(const SkPoint &p)
SkPath makeTransform(const SkMatrix &m, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
SkPath & conicTo(const SkPoint &p1, const SkPoint &p2, SkScalar w)
static SkPath Line(const SkPoint a, const SkPoint b)
static float max(float r, float g, float b)
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
unsigned useCenter Optional< SkMatrix > matrix
Optional< SkRect > bounds
sk_sp< SkBlender > blender SkRect rect
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however Start app with an specific route defined on the framework flutter assets dir
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
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 mode
bool operator==(C p1, const scoped_nsprotocol< C > &p2)
bool operator!=(C p1, const scoped_nsprotocol< C > &p2)
constexpr Color operator*(T value, const Color &c)
const myers::Point & get< 0 >(const myers::Segment &s)
constexpr bool contains(std::string_view str, std::string_view needle)
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
int compare(const void *untyped_lhs, const void *untyped_rhs)