17 switch (shape.
type()) {
41 fStart = shape.fStart;
43 fInverted = shape.fInverted;
51 : (fInverted ? 1 : 0);
52 key |= ((uint32_t) fType) << 2;
54 key |= (fCW ? 1 : 0) << 8;
58bool GrShape::simplifyPath(
unsigned flags) {
72 this->simplifyLine(pts[0], pts[1],
flags);
101bool GrShape::simplifyArc(
unsigned flags) {
185 this->simplifyLine(p1, p2,
flags);
208 }
else if (p1 == p2) {
209 this->simplifyPoint(p1,
false);
230void GrShape::simplifyPoint(
const SkPoint& point,
unsigned flags) {
249 bool wasClosed =
false;
269 wasClosed = this->simplifyPath(
flags);
272 wasClosed = this->simplifyArc(
flags);
288 switch (this->
type()) {
303 return arc.conservativelyContainsRect(
rect);
312 switch (this->
type()) {
329 switch (this->
type()) {
347 switch (this->
type()) {
369 switch (this->
type()) {
394 switch (this->
type()) {
429 out->toggleInverseFillType();
433 switch (this->
type()) {
457 out->toggleInverseFillType();
void swap(sk_sp< T > &a, sk_sp< T > &b)
#define SkDegreesToRadians(degrees)
#define SkScalarMod(x, y)
#define SkScalarSin(radians)
#define SkScalarCos(radians)
static SkScalar center(float pos0, float pos1)
GrShape & operator=(const GrShape &shape)
uint32_t stateKey() const
void setRRect(const SkRRect &rrect)
uint32_t segmentMask() const
void setPath(const SkPath &path)
void setLine(const GrLineSegment &line)
void setPathWindingParams(SkPathDirection dir, unsigned start)
SkPathDirection dir() const
static constexpr SkPathDirection kDefaultDir
static constexpr SkPathFillType kDefaultFillType
void setArc(const SkArc &arc)
bool conservativeContains(const SkRect &rect) const
unsigned startIndex() const
static constexpr unsigned kDefaultStart
void asPath(SkPath *out, bool simpleFill=true) const
void setPoint(const SkPoint &point)
bool convex(bool simpleFill=true) const
void setRect(const SkRect &rect)
bool simplify(unsigned flags=kAll_Flags)
static bool IsClosedSingleContour(const SkPath &path)
static bool IsRRect(const SkPath &path, SkRRect *rrect, SkPathDirection *dir, unsigned *start)
static bool IsSimpleRect(const SkPath &path, bool isSimpleFill, SkRect *rect, SkPathDirection *direction, unsigned *start)
static bool DrawArcIsConvex(SkScalar sweepAngle, bool useCenter, bool isFillNoPathEffect)
static bool IsOval(const SkPath &path, SkRect *rect, SkPathDirection *dir, unsigned *start)
static void CreateDrawArcPath(SkPath *path, const SkRect &oval, SkScalar startAngle, SkScalar sweepAngle, bool useCenter, bool isFillNoPathEffect)
bool conservativelyContainsRect(const SkRect &rect) const
SkPath & moveTo(SkScalar x, SkScalar y)
bool isLine(SkPoint line[2]) const
SkPathFillType getFillType() const
SkPath & addRRect(const SkRRect &rrect, SkPathDirection dir=SkPathDirection::kCW)
const SkRect & getBounds() const
uint32_t getSegmentMasks() const
bool isLastContourClosed() const
bool isRect(SkRect *rect, bool *isClosed=nullptr, SkPathDirection *direction=nullptr) const
bool contains(SkScalar x, SkScalar y) const
static bool ContainsPoint(const SkRRect &rr, const SkPoint &p)
const SkRect & rect() const
static SkRRect MakeOval(const SkRect &oval)
bool contains(const SkRect &rect) const
const SkRect & getBounds() const
FlutterSemanticsFlag flags
SkRect makeSorted() const
SkScalar fBottom
larger y-axis bounds
SkScalar fLeft
smaller x-axis bounds
SkScalar fRight
larger x-axis bounds
bool contains(SkScalar x, SkScalar y) const
constexpr float centerX() const
constexpr float height() const
constexpr float centerY() const
constexpr float width() const
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
SkScalar fTop
smaller y-axis bounds