Flutter Engine
The Flutter Engine
|
#include "include/core/SkMatrix.h"
#include "include/core/SkPath.h"
#include "include/core/SkPoint3.h"
#include "include/core/SkRSXform.h"
#include "include/core/SkSamplingOptions.h"
#include "include/core/SkSize.h"
#include "include/core/SkString.h"
#include "include/private/base/SkDebug.h"
#include "include/private/base/SkFloatingPoint.h"
#include "include/private/base/SkMalloc.h"
#include "include/private/base/SkMath.h"
#include "include/private/base/SkTo.h"
#include "src/base/SkFloatBits.h"
#include "src/base/SkVx.h"
#include "src/core/SkMatrixPriv.h"
#include "src/core/SkMatrixUtils.h"
#include "src/core/SkSamplingPriv.h"
#include <algorithm>
#include <cmath>
Go to the source code of this file.
Typedefs | |
typedef bool(* | PolyMapProc) (const SkPoint[], SkMatrix *) |
Enumerations | |
enum | { kTranslate_Shift , kScale_Shift , kAffine_Shift , kPerspective_Shift , kRectStaysRect_Shift } |
enum | MinMaxOrBoth { kMin_MinMaxOrBoth , kMax_MinMaxOrBoth , kBoth_MinMaxOrBoth } |
Functions | |
bool | operator== (const SkMatrix &a, const SkMatrix &b) |
static bool | is_degenerate_2x2 (SkScalar scaleX, SkScalar skewX, SkScalar skewY, SkScalar scaleY) |
static SkScalar | sdot (SkScalar a, SkScalar b, SkScalar c, SkScalar d) |
static SkScalar | sdot (SkScalar a, SkScalar b, SkScalar c, SkScalar d, SkScalar e, SkScalar f) |
static SkScalar | scross (SkScalar a, SkScalar b, SkScalar c, SkScalar d) |
static float | muladdmul (float a, float b, float c, float d) |
static float | rowcol3 (const float row[], const float col[]) |
static bool | only_scale_and_translate (unsigned mask) |
static SkScalar | scross_dscale (SkScalar a, SkScalar b, SkScalar c, SkScalar d, double scale) |
static double | dcross (double a, double b, double c, double d) |
static SkScalar | dcross_dscale (double a, double b, double c, double d, double scale) |
static double | sk_determinant (const float mat[9], int isPerspective) |
static double | sk_inv_determinant (const float mat[9], int isPerspective) |
static skvx::float4 | sort_as_rect (const skvx::float4 <rb) |
static bool | checkForZero (float x) |
template<MinMaxOrBoth MIN_MAX_OR_BOTH> | |
bool | get_scale_factor (SkMatrix::TypeMask typeMask, const SkScalar m[9], SkScalar results[]) |
bool | SkTreatAsSprite (const SkMatrix &mat, const SkISize &size, const SkSamplingOptions &sampling, bool isAntiAlias) |
bool | SkDecomposeUpper2x2 (const SkMatrix &matrix, SkPoint *rotation1, SkPoint *scale, SkPoint *rotation2) |
Variables | |
static const int32_t | kScalar1Int = 0x3f800000 |
Definition at line 1381 of file SkMatrix.cpp.
anonymous enum |
Enumerator | |
---|---|
kTranslate_Shift | |
kScale_Shift | |
kAffine_Shift | |
kPerspective_Shift | |
kRectStaysRect_Shift |
Definition at line 72 of file SkMatrix.cpp.
enum MinMaxOrBoth |
Enumerator | |
---|---|
kMin_MinMaxOrBoth | |
kMax_MinMaxOrBoth | |
kBoth_MinMaxOrBoth |
Definition at line 1422 of file SkMatrix.cpp.
|
inlinestatic |
Definition at line 1289 of file SkMatrix.cpp.
|
inlinestatic |
Definition at line 705 of file SkMatrix.cpp.
|
inlinestatic |
Definition at line 709 of file SkMatrix.cpp.
bool get_scale_factor | ( | SkMatrix::TypeMask | typeMask, |
const SkScalar | m[9], | ||
SkScalar | results[] | ||
) |
Definition at line 1428 of file SkMatrix.cpp.
|
inlinestatic |
Definition at line 172 of file SkMatrix.cpp.
|
inlinestatic |
Definition at line 591 of file SkMatrix.cpp.
|
static |
Definition at line 599 of file SkMatrix.cpp.
Compares a and b; returns true if a and b are numerically equal. Returns true even if sign of zero values are different. Returns false if either SkMatrix contains NaN, even if the other SkMatrix also contains NaN.
Definition at line 160 of file SkMatrix.cpp.
|
inlinestatic |
Definition at line 595 of file SkMatrix.cpp.
Definition at line 250 of file SkMatrix.cpp.
|
inlinestatic |
Definition at line 700 of file SkMatrix.cpp.
Definition at line 241 of file SkMatrix.cpp.
|
inlinestatic |
Definition at line 245 of file SkMatrix.cpp.
|
static |
Definition at line 714 of file SkMatrix.cpp.
|
static |
Definition at line 733 of file SkMatrix.cpp.
bool SkDecomposeUpper2x2 | ( | const SkMatrix & | matrix, |
SkPoint * | rotation1, | ||
SkPoint * | scale, | ||
SkPoint * | rotation2 | ||
) |
Decomposes the upper-left 2x2 of the matrix into a rotation (represented by the cosine and sine of the rotation angle), followed by a non-uniform scale, followed by another rotation. If there is a reflection, one of the scale factors will be negative. Returns true if successful. Returns false if the matrix is degenerate.
Definition at line 1689 of file SkMatrix.cpp.
bool SkTreatAsSprite | ( | const SkMatrix & | mat, |
const SkISize & | size, | ||
const SkSamplingOptions & | sampling, | ||
bool | isAntiAlias | ||
) |
Given a matrix, size and an antialias setting, return true if the computed dst-rect would align such that there is a 1-to-1 coorspondence between src and dst pixels. This can be called by drawing code to see if drawBitmap can be turned into drawSprite (which is faster).
The src-rect is defined to be { 0, 0, size.width(), size.height() }
Definition at line 1614 of file SkMatrix.cpp.
|
static |
Definition at line 1119 of file SkMatrix.cpp.
|
static |
Definition at line 80 of file SkMatrix.cpp.