Flutter Engine
The Flutter Engine
|
#include <SkPathPriv.h>
Classes | |
struct | Iterate |
struct | Verbs |
Public Types | |
using | RangeIter = SkPath::RangeIter |
Static Public Member Functions | |
static SkPathFirstDirection | AsFirstDirection (SkPathDirection dir) |
static SkPathFirstDirection | OppositeFirstDirection (SkPathFirstDirection dir) |
static SkPathFirstDirection | ComputeFirstDirection (const SkPath &) |
static bool | IsClosedSingleContour (const SkPath &path) |
static int | LeadingMoveToCount (const SkPath &path) |
static void | AddGenIDChangeListener (const SkPath &path, sk_sp< SkIDChangeListener > listener) |
static bool | IsSimpleRect (const SkPath &path, bool isSimpleFill, SkRect *rect, SkPathDirection *direction, unsigned *start) |
static void | CreateDrawArcPath (SkPath *path, const SkArc &arc, bool isFillNoPathEffect) |
static bool | DrawArcIsConvex (SkScalar sweepAngle, SkArc::Type arcType, bool isFillNoPathEffect) |
static void | ShrinkToFit (SkPath *path) |
static const uint8_t * | VerbData (const SkPath &path) |
static const SkPoint * | PointData (const SkPath &path) |
static int | ConicWeightCnt (const SkPath &path) |
static const SkScalar * | ConicWeightData (const SkPath &path) |
static bool | TestingOnly_unique (const SkPath &path) |
static bool | HasComputedBounds (const SkPath &path) |
static bool | IsOval (const SkPath &path, SkRect *rect, SkPathDirection *dir, unsigned *start) |
static bool | IsRRect (const SkPath &path, SkRRect *rrect, SkPathDirection *dir, unsigned *start) |
static bool | TooBigForMath (const SkRect &bounds) |
static bool | TooBigForMath (const SkPath &path) |
static int | PtsInIter (unsigned verb) |
static int | PtsInVerb (unsigned verb) |
static bool | IsAxisAligned (const SkPath &path) |
static bool | AllPointsEq (const SkPoint pts[], int count) |
static int | LastMoveToIndex (const SkPath &path) |
static bool | IsRectContour (const SkPath &, bool allowPartial, int *currVerb, const SkPoint **ptsPtr, bool *isClosed, SkPathDirection *direction, SkRect *rect) |
static bool | IsNestedFillRects (const SkPath &, SkRect rect[2], SkPathDirection dirs[2]=nullptr) |
static bool | IsInverseFillType (SkPathFillType fill) |
static SkPathFillType | ConvertToNonInverseFillType (SkPathFillType fill) |
static bool | PerspectiveClip (const SkPath &src, const SkMatrix &, SkPath *result) |
static int | GenIDChangeListenersCount (const SkPath &) |
static void | UpdatePathPoint (SkPath *path, int index, const SkPoint &pt) |
static SkPathConvexity | GetConvexity (const SkPath &path) |
static SkPathConvexity | GetConvexityOrUnknown (const SkPath &path) |
static void | SetConvexity (const SkPath &path, SkPathConvexity c) |
static void | ForceComputeConvexity (const SkPath &path) |
static void | ReverseAddPath (SkPathBuilder *builder, const SkPath &reverseMe) |
static SkPath | MakePath (const SkPathVerbAnalysis &analysis, const SkPoint points[], const uint8_t verbs[], int verbCount, const SkScalar conics[], SkPathFillType fillType, bool isVolatile) |
Static Public Attributes | |
static constexpr SkScalar | kW0PlaneDistance = 1.f / (1 << 14) |
Definition at line 37 of file SkPathPriv.h.
using SkPathPriv::RangeIter = SkPath::RangeIter |
Iterates through a raw range of path verbs, points, and conics. All values are returned unaltered.
NOTE: This class's definition will be moved into SkPathPriv once RangeIter is removed.
Definition at line 164 of file SkPathPriv.h.
|
inlinestatic |
Definition at line 106 of file SkPathPriv.h.
Definition at line 339 of file SkPathPriv.h.
|
inlinestatic |
Definition at line 43 of file SkPathPriv.h.
|
static |
Tries to compute the direction of the outer-most non-degenerate contour. If it can be computed, return that direction. If it cannot be determined, or the contour is known to be convex, return kUnknown. If the direction was determined, it is cached to make subsequent calls return quickly.
Definition at line 2627 of file SkPath.cpp.
Returns the number of conic weights in the path
Definition at line 208 of file SkPathPriv.h.
Returns a raw pointer to the path conic weights.
Definition at line 213 of file SkPathPriv.h.
|
inlinestatic |
Returns equivalent SkPath::FillType representing SkPath fill inside its bounds.
fill | one of: kWinding_FillType, kEvenOdd_FillType, kInverseWinding_FillType, kInverseEvenOdd_FillType |
Definition at line 379 of file SkPathPriv.h.
|
static |
Creates a path from arc params using the semantics of SkCanvas::drawArc. This function assumes empty ovals and zero sweeps have already been filtered out.
Definition at line 3356 of file SkPath.cpp.
|
static |
Determines whether an arc produced by CreateDrawArcPath will be convex. Assumes a non-empty oval.
Definition at line 3340 of file SkPath.cpp.
|
inlinestatic |
Definition at line 416 of file SkPathPriv.h.
Gets the number of GenIDChangeListeners. If another thread has access to this path then this may be stale before return and only indicates that the count was the return value at some point during the execution of the function.
Definition at line 3988 of file SkPath.cpp.
|
inlinestatic |
Definition at line 407 of file SkPathPriv.h.
|
inlinestatic |
Definition at line 410 of file SkPathPriv.h.
|
inlinestatic |
Definition at line 223 of file SkPathPriv.h.
|
static |
Definition at line 3992 of file SkPath.cpp.
|
inlinestatic |
Definition at line 67 of file SkPathPriv.h.
|
inlinestatic |
Definition at line 368 of file SkPathPriv.h.
|
static |
Returns true if SkPath is equivalent to nested SkRect pair when filled. If false, rect and dirs are unchanged. If true, rect and dirs are written to if not nullptr: setting rect[0] to outer SkRect, and rect[1] to inner SkRect; setting dirs[0] to SkPathDirection of outer SkRect, and dirs[1] to SkPathDirection of inner SkRect.
rect | storage for SkRect pair; may be nullptr |
dirs | storage for SkPathDirection pair; may be nullptr |
Definition at line 3780 of file SkPath.cpp.
|
inlinestatic |
Returns true if constructed by addCircle(), addOval(); and in some cases, addRoundRect(), addRRect(). SkPath constructed with conicTo() or rConicTo() will not return true though SkPath draws oval.
rect receives bounds of oval. dir receives SkPathDirection of oval: kCW_Direction if clockwise, kCCW_Direction if counterclockwise. start receives start of oval: 0 for top, 1 for right, 2 for bottom, 3 for left.
rect, dir, and start are unmodified if oval is not found.
Triggers performance optimizations on some GPU surface implementations.
rect | storage for bounding SkRect of oval; may be nullptr |
dir | storage for SkPathDirection; may be nullptr |
start | storage for start of oval; may be nullptr |
Definition at line 245 of file SkPathPriv.h.
|
static |
Definition at line 3639 of file SkPath.cpp.
|
inlinestatic |
Returns true if constructed by addRoundRect(), addRRect(); and if construction is not empty, not SkRect, and not oval. SkPath constructed with other calls will not return true though SkPath draws SkRRect.
rrect receives bounds of SkRRect. dir receives SkPathDirection of oval: kCW_Direction if clockwise, kCCW_Direction if counterclockwise. start receives start of SkRRect: 0 for top, 1 for right, 2 for bottom, 3 for left.
rrect, dir, and start are unmodified if SkRRect is not found.
Triggers performance optimizations on some GPU surface implementations.
rrect | storage for bounding SkRect of SkRRect; may be nullptr |
dir | storage for SkPathDirection; may be nullptr |
start | storage for start of SkRRect; may be nullptr |
Definition at line 272 of file SkPathPriv.h.
|
static |
This returns true for a rect that has a move followed by 3 or 4 lines and a close. If 'isSimpleFill' is true, an uncloseed rect will also be accepted as long as it starts and ends at the same corner. This does not permit degenerate line or point rectangles.
Definition at line 3244 of file SkPath.cpp.
Definition at line 348 of file SkPathPriv.h.
|
inlinestatic |
Definition at line 425 of file SkPathPriv.h.
|
inlinestatic |
Return the opposite of the specified direction. kUnknown is its own opposite.
Definition at line 52 of file SkPathPriv.h.
|
static |
If needed (to not blow-up under a perspective matrix), clip the path, returning the answer in "result", and return true.
Note result might be empty (if the path was completely clipped out).
If no clipping is needed, returns false and "result" is left unchanged.
Definition at line 3962 of file SkPath.cpp.
Returns a raw pointer to the path points
Definition at line 203 of file SkPathPriv.h.
|
inlinestatic |
Definition at line 305 of file SkPathPriv.h.
|
inlinestatic |
Definition at line 322 of file SkPathPriv.h.
|
inlinestatic |
Definition at line 421 of file SkPathPriv.h.
|
inlinestatic |
Definition at line 413 of file SkPathPriv.h.
|
inlinestatic |
Definition at line 130 of file SkPathPriv.h.
|
inlinestatic |
Returns true if the underlying SkPathRef has one single owner.
Definition at line 218 of file SkPathPriv.h.
|
inlinestatic |
Definition at line 300 of file SkPathPriv.h.
|
inlinestatic |
Sometimes in the drawing pipeline, we have to perform math on path coordinates, even after the path is in device-coordinates. Tessellation and clipping are two examples. Usually this is pretty modest, but it can involve subtracting/adding coordinates, or multiplying by small constants (e.g. 2,3,4). To try to preflight issues where these optionations could turn finite path values into infinities (or NaNs), we allow the upper drawing code to reject the path if its bounds (in device coordinates) is too close to max float.
Definition at line 290 of file SkPathPriv.h.
|
inlinestatic |
Definition at line 400 of file SkPathPriv.h.
|
inlinestatic |
Returns a pointer to the verb data.
Definition at line 198 of file SkPathPriv.h.
|
inlinestaticconstexpr |
Definition at line 41 of file SkPathPriv.h.