Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
DAffineMatrix Class Reference

Public Member Functions

double operator[] (int index) const
 
double & operator[] (int index)
 
void setAffine (double m11, double m12, double m13, double m21, double m22, double m23)
 
void reset ()
 
void setIdentity ()
 
DPoint mapPoint (const SkPoint &src) const
 
DPoint mapPoint (const DPoint &src) const
 

Detailed Description

Definition at line 81 of file GrDistanceFieldGenFromVector.cpp.

Member Function Documentation

◆ mapPoint() [1/2]

DPoint DAffineMatrix::mapPoint ( const DPoint &  src) const
inline

Definition at line 119 of file GrDistanceFieldGenFromVector.cpp.

119 {
120 return { fMat[0] * src.fX + fMat[1] * src.fY + fMat[2],
121 fMat[3] * src.fX + fMat[4] * src.fY + fMat[5] };
122 }

◆ mapPoint() [2/2]

DPoint DAffineMatrix::mapPoint ( const SkPoint src) const
inline

Definition at line 114 of file GrDistanceFieldGenFromVector.cpp.

114 {
115 DPoint pt = {src.fX, src.fY};
116 return this->mapPoint(pt);
117 }
DPoint mapPoint(const SkPoint &src) const

◆ operator[]() [1/2]

double & DAffineMatrix::operator[] ( int  index)
inline

Definition at line 88 of file GrDistanceFieldGenFromVector.cpp.

88 {
89 SkASSERT((unsigned)index < 6);
90 return fMat[index];
91 }
#define SkASSERT(cond)
Definition SkAssert.h:116

◆ operator[]() [2/2]

double DAffineMatrix::operator[] ( int  index) const
inline

Definition at line 83 of file GrDistanceFieldGenFromVector.cpp.

83 {
84 SkASSERT((unsigned)index < 6);
85 return fMat[index];
86 }

◆ reset()

void DAffineMatrix::reset ( )
inline

Set the matrix to identity

Definition at line 105 of file GrDistanceFieldGenFromVector.cpp.

105 {
106 fMat[0] = fMat[4] = 1.0;
107 fMat[1] = fMat[3] =
108 fMat[2] = fMat[5] = 0.0;
109 }

◆ setAffine()

void DAffineMatrix::setAffine ( double  m11,
double  m12,
double  m13,
double  m21,
double  m22,
double  m23 
)
inline

Definition at line 93 of file GrDistanceFieldGenFromVector.cpp.

94 {
95 fMat[0] = m11;
96 fMat[1] = m12;
97 fMat[2] = m13;
98 fMat[3] = m21;
99 fMat[4] = m22;
100 fMat[5] = m23;
101 }

◆ setIdentity()

void DAffineMatrix::setIdentity ( )
inline

Definition at line 112 of file GrDistanceFieldGenFromVector.cpp.

112{ this->reset(); }

The documentation for this class was generated from the following file: