#include <Transform.h>
|
| TransformAdapter2D (const AnimationBuilder &, const skjson::ObjectValue *janchor_point, const skjson::ObjectValue *jposition, const skjson::ObjectValue *jscale, const skjson::ObjectValue *jrotation, const skjson::ObjectValue *jskew, const skjson::ObjectValue *jskew_axis, bool auto_orient=false) |
|
| ~TransformAdapter2D () override |
|
SkPoint | getAnchorPoint () const |
|
void | setAnchorPoint (const SkPoint &) |
|
SkPoint | getPosition () const |
|
void | setPosition (const SkPoint &) |
|
SkVector | getScale () const |
|
void | setScale (const SkVector &) |
|
float | getRotation () const |
|
void | setRotation (float r) |
|
float | getSkew () const |
|
void | setSkew (float sk) |
|
float | getSkewAxis () const |
|
void | setSkewAxis (float sa) |
|
SkMatrix | totalMatrix () const |
|
const sk_sp< sksg::Matrix< SkMatrix > > & | node () const |
|
template<typename T > |
bool | bind (const AnimationBuilder &, const skjson::ObjectValue *, T *) |
|
template<typename T > |
bool | bind (const AnimationBuilder &abuilder, const skjson::ObjectValue *jobject, T &v) |
|
bool | bindAutoOrientable (const AnimationBuilder &abuilder, const skjson::ObjectValue *jobject, SkV2 *v, float *orientation) |
|
bool | isStatic () const |
|
template<> |
bool | bind (const AnimationBuilder &abuilder, const skjson::ObjectValue *jprop, ScalarValue *v) |
|
template<> |
bool | bind (const AnimationBuilder &abuilder, const skjson::ObjectValue *jprop, ShapeValue *v) |
|
template<> |
bool | bind (const AnimationBuilder &abuilder, const skjson::ObjectValue *jprop, TextValue *v) |
|
template<> |
bool | bind (const AnimationBuilder &abuilder, const skjson::ObjectValue *jprop, Vec2Value *v) |
|
template<> |
bool | bind (const AnimationBuilder &abuilder, const skjson::ObjectValue *jprop, VectorValue *v) |
|
template<> |
bool | bind (const AnimationBuilder &abuilder, const skjson::ObjectValue *jprop, ColorValue *v) |
|
StateChanged | seek (float t) |
|
| SkRefCntBase () |
|
virtual | ~SkRefCntBase () |
|
bool | unique () const |
|
void | ref () const |
|
void | unref () const |
|
Definition at line 29 of file Transform.h.
◆ TransformAdapter2D()
Definition at line 23 of file Transform.cpp.
32
33 this->
bind(abuilder, janchor_point, fAnchorPoint);
34 this->
bind(abuilder, jscale , fScale);
35 this->
bind(abuilder, jrotation , fRotation);
36 this->
bind(abuilder, jskew , fSkew);
37 this->
bind(abuilder, jskew_axis , fSkewAxis);
38
40 : nullptr);
41}
static const SkMatrix & I()
bool bindAutoOrientable(const AnimationBuilder &abuilder, const skjson::ObjectValue *jobject, SkV2 *v, float *orientation)
bool bind(const AnimationBuilder &, const skjson::ObjectValue *, T *)
◆ ~TransformAdapter2D()
skottie::internal::TransformAdapter2D::~TransformAdapter2D |
( |
| ) |
|
|
override |
◆ getAnchorPoint()
SkPoint skottie::internal::TransformAdapter2D::getAnchorPoint |
( |
| ) |
const |
Definition at line 72 of file Transform.cpp.
72 {
73 return { fAnchorPoint.
x, fAnchorPoint.
y };
74}
◆ getPosition()
SkPoint skottie::internal::TransformAdapter2D::getPosition |
( |
| ) |
const |
Definition at line 81 of file Transform.cpp.
81 {
82 return { fPosition.
x, fPosition.
y };
83}
◆ getRotation()
float skottie::internal::TransformAdapter2D::getRotation |
( |
| ) |
const |
|
inline |
◆ getScale()
SkVector skottie::internal::TransformAdapter2D::getScale |
( |
| ) |
const |
Definition at line 90 of file Transform.cpp.
90 {
91 return { fScale.
x, fScale.
y };
92}
◆ getSkew()
float skottie::internal::TransformAdapter2D::getSkew |
( |
| ) |
const |
|
inline |
◆ getSkewAxis()
float skottie::internal::TransformAdapter2D::getSkewAxis |
( |
| ) |
const |
|
inline |
◆ setAnchorPoint()
void skottie::internal::TransformAdapter2D::setAnchorPoint |
( |
const SkPoint & |
ap | ) |
|
Definition at line 76 of file Transform.cpp.
76 {
77 fAnchorPoint = { ap.
x(), ap.
y() };
78 this->onSync();
79}
constexpr float y() const
constexpr float x() const
◆ setPosition()
void skottie::internal::TransformAdapter2D::setPosition |
( |
const SkPoint & |
p | ) |
|
Definition at line 85 of file Transform.cpp.
85 {
86 fPosition = {
p.x(),
p.y() };
87 this->onSync();
88}
◆ setRotation()
void skottie::internal::TransformAdapter2D::setRotation |
( |
float |
r | ) |
|
Definition at line 99 of file Transform.cpp.
99 {
100 fRotation = r;
101 this->onSync();
102}
◆ setScale()
void skottie::internal::TransformAdapter2D::setScale |
( |
const SkVector & |
s | ) |
|
Definition at line 94 of file Transform.cpp.
94 {
95 fScale = {
s.
x(),
s.
y() };
96 this->onSync();
97}
◆ setSkew()
void skottie::internal::TransformAdapter2D::setSkew |
( |
float |
sk | ) |
|
Definition at line 104 of file Transform.cpp.
104 {
105 fSkew = sk;
106 this->onSync();
107}
◆ setSkewAxis()
void skottie::internal::TransformAdapter2D::setSkewAxis |
( |
float |
sa | ) |
|
Definition at line 109 of file Transform.cpp.
109 {
110 fSkewAxis = sa;
111 this->onSync();
112}
◆ totalMatrix()
SkMatrix skottie::internal::TransformAdapter2D::totalMatrix |
( |
| ) |
const |
Definition at line 49 of file Transform.cpp.
49 {
50 auto skew_matrix = [](float sk, float sa) {
52
53
54 static constexpr float kMaxSkewAngle = 85;
57
58
59
63 };
64
67 * skew_matrix (fSkew, fSkewAxis)
70}
#define SkDegreesToRadians(degrees)
static constexpr const T & SkTPin(const T &x, const T &lo, const T &hi)
static SkMatrix Scale(SkScalar sx, SkScalar sy)
static SkMatrix RotateDeg(SkScalar deg)
static SkMatrix RotateRad(SkScalar rad)
static SkMatrix Translate(SkScalar dx, SkScalar dy)
static SkMatrix Skew(SkScalar kx, SkScalar ky)
The documentation for this class was generated from the following files: