Skia
2DGraphicsLibrary
|
A class representing a linear transformation from one of the built-in coordinate sets (local or position). More...
#include <GrCoordTransform.h>
Public Member Functions | |
GrCoordTransform (GrCoordSet sourceCoords, const GrTexture *texture, GrTextureParams::FilterMode filter) | |
Create a transformation that maps [0, 1] to a texture's boundaries. More... | |
GrCoordTransform (GrCoordSet sourceCoords, const SkMatrix &m, const GrTexture *texture, GrTextureParams::FilterMode filter) | |
Create a transformation from a matrix. More... | |
GrCoordTransform (GrCoordSet sourceCoords, const SkMatrix &m, GrSLPrecision precision=kDefault_GrSLPrecision) | |
Create a transformation that applies the matrix to a coord set. | |
void | reset (GrCoordSet sourceCoords, const GrTexture *texture, GrTextureParams::FilterMode filter) |
void | reset (GrCoordSet, const SkMatrix &, const GrTexture *, GrTextureParams::FilterMode filter) |
void | reset (GrCoordSet sourceCoords, const SkMatrix &m, GrSLPrecision precision=kDefault_GrSLPrecision) |
GrCoordTransform & | operator= (const GrCoordTransform &that) |
SkMatrix * | accessMatrix () |
Access the matrix for editing. More... | |
bool | operator== (const GrCoordTransform &that) const |
bool | operator!= (const GrCoordTransform &that) const |
GrCoordSet | sourceCoords () const |
const SkMatrix & | getMatrix () const |
bool | reverseY () const |
GrSLPrecision | precision () const |
Static Public Member Functions | |
static SkMatrix | MakeDivByTextureWHMatrix (const GrTexture *texture) |
Useful for effects that want to insert a texture matrix that is implied by the texture dimensions. | |
Private Types | |
typedef SkNoncopyable | INHERITED |
Private Attributes | |
GrCoordSet | fSourceCoords |
SkMatrix | fMatrix |
bool | fReverseY |
GrSLPrecision | fPrecision |
A class representing a linear transformation from one of the built-in coordinate sets (local or position).
GrProcessors just define these transformations, and the framework does the rest of the work to make the transformed coordinates available in their fragment shader.
|
inline |
Create a transformation that maps [0, 1] to a texture's boundaries.
The precision is inferred from the texture size and filter. The texture origin also implies whether a y-reversal should be performed.
|
inline |
Create a transformation from a matrix.
The precision is inferred from the texture size and filter. The texture origin also implies whether a y-reversal should be performed.
|
inline |
Access the matrix for editing.
Note, this must be done before adding the transform to an effect, since effects are immutable.