Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
SkOpCurve Struct Reference

#include <SkPathOpsCurve.h>

Public Member Functions

 SkDEBUGCODE (SkPath::Verb fVerb;) const SkPoint &operator[](int n) const
 
void dump () const
 
void set (const SkDQuad &quad)
 
void set (const SkDCubic &cubic)
 

Public Attributes

SkPoint fPts [4]
 
SkScalar fWeight
 

Detailed Description

Definition at line 25 of file SkPathOpsCurve.h.

Member Function Documentation

◆ dump()

void SkOpCurve::dump ( ) const

Definition at line 1076 of file PathOpsDebug.cpp.

1076 {
1078 SkDebugf("{{");
1079 int index;
1080 for (index = 0; index <= count - 1; ++index) {
1081 SkDebugf("{%1.9gf,%1.9gf}, ", fPts[index].fX, fPts[index].fY);
1082 }
1083 SkDebugf("{%1.9gf,%1.9gf}}}\n", fPts[index].fX, fPts[index].fY);
1084}
int count
Definition: FontMgrTest.cpp:50
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
#define SkDEBUGRELEASE(a, b)
int SkPathOpsVerbToPoints(SkPath::Verb verb)
@ kCubic_Verb
Definition: SkPath.h:1470
SkPoint fPts[4]

◆ set() [1/2]

void SkOpCurve::set ( const SkDCubic cubic)
inline

Definition at line 45 of file SkPathOpsCurve.h.

45 {
46 for (int index = 0; index < SkDCubic::kPointCount; ++index) {
47 fPts[index] = cubic[index].asSkPoint();
48 }
51 }
AI float cubic(float precision, const SkPoint pts[], const VectorXform &vectorXform=VectorXform())
Definition: WangsFormula.h:195
static const int kPointCount
SkScalar fWeight
SkDEBUGCODE(SkPath::Verb fVerb;) const SkPoint &operator[](int n) const

◆ set() [2/2]

void SkOpCurve::set ( const SkDQuad quad)
inline

Definition at line 37 of file SkPathOpsCurve.h.

37 {
38 for (int index = 0; index < SkDQuad::kPointCount; ++index) {
39 fPts[index] = quad[index].asSkPoint();
40 }
43 }
@ kQuad_Verb
Definition: SkPath.h:1468
static const int kPointCount
Definition: SkPathOpsQuad.h:35

◆ SkDEBUGCODE()

SkOpCurve::SkDEBUGCODE ( SkPath::Verb fVerb;  ) const &
inline

Definition at line 28 of file SkPathOpsCurve.h.

30 {
31 SkASSERT(n >= 0 && n <= SkPathOpsVerbToPoints(fVerb));
32 return fPts[n];
33 }
#define SkASSERT(cond)
Definition: SkAssert.h:116

Member Data Documentation

◆ fPts

SkPoint SkOpCurve::fPts[4]

Definition at line 26 of file SkPathOpsCurve.h.

◆ fWeight

SkScalar SkOpCurve::fWeight

Definition at line 27 of file SkPathOpsCurve.h.


The documentation for this struct was generated from the following files: