Flutter Engine
The Flutter Engine
|
#include <SkGeometry.h>
Public Types | |
enum | { kMaxConicsForArc = 5 } |
Public Member Functions | |
SkConic () | |
SkConic (const SkPoint &p0, const SkPoint &p1, const SkPoint &p2, SkScalar w) | |
SkConic (const SkPoint pts[3], SkScalar w) | |
void | set (const SkPoint pts[3], SkScalar w) |
void | set (const SkPoint &p0, const SkPoint &p1, const SkPoint &p2, SkScalar w) |
void | setW (SkScalar w) |
void | evalAt (SkScalar t, SkPoint *pos, SkVector *tangent=nullptr) const |
bool | chopAt (SkScalar t, SkConic dst[2]) const |
void | chopAt (SkScalar t1, SkScalar t2, SkConic *dst) const |
void | chop (SkConic dst[2]) const |
SkPoint | evalAt (SkScalar t) const |
SkVector | evalTangentAt (SkScalar t) const |
void | computeAsQuadError (SkVector *err) const |
bool | asQuadTol (SkScalar tol) const |
int SK_SPI | computeQuadPOW2 (SkScalar tol) const |
int SK_SPI | chopIntoQuadsPOW2 (SkPoint pts[], int pow2) const |
float | findMidTangent () const |
bool | findXExtrema (SkScalar *t) const |
bool | findYExtrema (SkScalar *t) const |
bool | chopAtXExtrema (SkConic dst[2]) const |
bool | chopAtYExtrema (SkConic dst[2]) const |
void | computeTightBounds (SkRect *bounds) const |
void | computeFastBounds (SkRect *bounds) const |
Static Public Member Functions | |
static SkScalar | TransformW (const SkPoint[3], SkScalar w, const SkMatrix &) |
static int | BuildUnitArc (const SkVector &start, const SkVector &stop, SkRotationDirection, const SkMatrix *, SkConic conics[kMaxConicsForArc]) |
Public Attributes | |
SkPoint | fPts [3] |
SkScalar | fW |
Definition at line 326 of file SkGeometry.h.
anonymous enum |
Enumerator | |
---|---|
kMaxConicsForArc |
Definition at line 410 of file SkGeometry.h.
|
inline |
Definition at line 327 of file SkGeometry.h.
Definition at line 328 of file SkGeometry.h.
Definition at line 332 of file SkGeometry.h.
bool SkConic::asQuadTol | ( | SkScalar | tol | ) | const |
Definition at line 1480 of file SkGeometry.cpp.
|
static |
Definition at line 1729 of file SkGeometry.cpp.
void SkConic::chop | ( | SkConic | dst[2] | ) | const |
Definition at line 1430 of file SkGeometry.cpp.
Definition at line 1297 of file SkGeometry.cpp.
Definition at line 1328 of file SkGeometry.cpp.
bool SkConic::chopAtXExtrema | ( | SkConic | dst[2] | ) | const |
Definition at line 1647 of file SkGeometry.cpp.
bool SkConic::chopAtYExtrema | ( | SkConic | dst[2] | ) | const |
Definition at line 1665 of file SkGeometry.cpp.
Chop this conic into N quads, stored continguously in pts[], where N = 1 << pow2. The amount of storage needed is (1 + 2 * N)
Definition at line 1570 of file SkGeometry.cpp.
void SkConic::computeAsQuadError | ( | SkVector * | err | ) | const |
Definition at line 1475 of file SkGeometry.cpp.
void SkConic::computeFastBounds | ( | SkRect * | bounds | ) | const |
Definition at line 1699 of file SkGeometry.cpp.
return the power-of-2 number of quads needed to approximate this conic with a sequence of quads. Will be >= 0.
Definition at line 1488 of file SkGeometry.cpp.
void SkConic::computeTightBounds | ( | SkRect * | bounds | ) | const |
Definition at line 1683 of file SkGeometry.cpp.
Definition at line 1360 of file SkGeometry.cpp.
Given a t-value [0...1] return its position and/or tangent. If pos is not null, return its position at the t-value. If tangent is not null, return its tangent at the t-value. NOTE the tangent value's length is arbitrary, and only its direction should be used.
Definition at line 1386 of file SkGeometry.cpp.
Definition at line 1364 of file SkGeometry.cpp.
float SkConic::findMidTangent | ( | ) | const |
Definition at line 1602 of file SkGeometry.cpp.
bool SkConic::findXExtrema | ( | SkScalar * | t | ) | const |
Definition at line 1639 of file SkGeometry.cpp.
bool SkConic::findYExtrema | ( | SkScalar * | t | ) | const |
Definition at line 1643 of file SkGeometry.cpp.
Definition at line 344 of file SkGeometry.h.
|
inline |
Definition at line 351 of file SkGeometry.h.
Find the parameter value where the conic takes on its maximum curvature.
t | output scalar for max curvature. Will be unchanged if max curvature outside 0..1 range. |
Definition at line 1710 of file SkGeometry.cpp.
SkPoint SkConic::fPts[3] |
Definition at line 336 of file SkGeometry.h.
SkScalar SkConic::fW |
Definition at line 337 of file SkGeometry.h.