Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
BouncingTaggedImage Class Reference
Inheritance diagram for BouncingTaggedImage:
BouncingParticle MMObject

Public Member Functions

 BouncingTaggedImage (SkRandom *random, SkSize stageSize, SkSize particleSize, float maxVelocity)
 
void move ()
 
void animate (double deltaNanos) override
 
void draw (SkCanvas *canvas) override
 
const SkMatrixtransform ()
 
SkRect rect ()
 
- Public Member Functions inherited from BouncingParticle
 BouncingParticle (SkRandom *random, SkSize stageSize, SkSize particleSize, float maxVelocity)
 
void animate (double deltaNanos) override
 
- Public Member Functions inherited from MMObject
virtual ~MMObject ()=default
 
virtual void draw (SkCanvas *canvas)=0
 
virtual void animate (double)=0
 

Additional Inherited Members

- Protected Attributes inherited from BouncingParticle
SkSize fStageSize
 
SkSize fSize
 
SkPoint fPosition
 
float fAngle
 
float fVelocity
 
Rotater fRotater
 

Detailed Description

Definition at line 762 of file MotionMarkSlide.cpp.

Constructor & Destructor Documentation

◆ BouncingTaggedImage()

BouncingTaggedImage::BouncingTaggedImage ( SkRandom random,
SkSize  stageSize,
SkSize  particleSize,
float  maxVelocity 
)
inline

Definition at line 764 of file MotionMarkSlide.cpp.

765 : BouncingParticle(random, stageSize, particleSize, maxVelocity) {
766 this->move();
767 fRect = SkRect::MakeSize(fSize);
768 fRect.offset(-fSize.width()/2, -fSize.height()/2);
769 }
BouncingParticle(SkRandom *random, SkSize stageSize, SkSize particleSize, float maxVelocity)
void offset(float dx, float dy)
Definition: SkRect.h:1016
static constexpr SkRect MakeSize(const SkSize &size)
Definition: SkRect.h:633
SkScalar width() const
Definition: SkSize.h:76
SkScalar height() const
Definition: SkSize.h:77

Member Function Documentation

◆ animate()

void BouncingTaggedImage::animate ( double  deltaNanos)
inlineoverridevirtual

Reimplemented from BouncingParticle.

Definition at line 777 of file MotionMarkSlide.cpp.

777 {
778 BouncingParticle::animate(deltaNanos);
779 this->move();
780 }
void animate(double deltaNanos) override

◆ draw()

void BouncingTaggedImage::draw ( SkCanvas canvas)
inlineoverridevirtual

Implements MMObject.

Definition at line 782 of file MotionMarkSlide.cpp.

782 {
783 // handled by the Stage
784 }

◆ move()

void BouncingTaggedImage::move ( )
inline

Definition at line 771 of file MotionMarkSlide.cpp.

771 {
773 fTransform.setTranslateX(fPosition.fX);
774 fTransform.setTranslateY(fPosition.fY);
775 }
float degrees()
SkMatrix & setTranslateY(SkScalar v)
Definition: SkMatrix.h:530
static SkMatrix RotateDeg(SkScalar deg)
Definition: SkMatrix.h:104
SkMatrix & setTranslateX(SkScalar v)
Definition: SkMatrix.h:524
SIN Vec< N, float > floor(const Vec< N, float > &x)
Definition: SkVx.h:703
float fX
x-axis value
Definition: SkPoint_impl.h:164
float fY
y-axis value
Definition: SkPoint_impl.h:165

◆ rect()

SkRect BouncingTaggedImage::rect ( )
inline

Definition at line 787 of file MotionMarkSlide.cpp.

787{ return fRect; }

◆ transform()

const SkMatrix & BouncingTaggedImage::transform ( )
inline

Definition at line 786 of file MotionMarkSlide.cpp.

786{ return fTransform; }

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