rllib  1
Classes | Public Member Functions | Public Attributes | List of all members
rlSvgPosition Class Reference

#include <rlsvganimator.h>

Collaboration diagram for rlSvgPosition:
Collaboration graph
[legend]

Classes

struct  rlPositionInit
 

Public Member Functions

 rlSvgPosition ()
 
 rlSvgPosition (float sx_init, float a_init, float x0_init, float y0_init, float cx_init, float cy_init)
 
virtual ~rlSvgPosition ()
 
void setInit (float x0_init, float y0_init, float w_init, float h_init)
 
void move (float x, float y)
 
void moveRelative (float dx, float dy)
 
void scale (float s)
 
void scaleRelative (float ds)
 
void rotate (float alpha, float cx, float cy)
 

Public Attributes

float sx
 
float alpha
 
float x0
 
float y0
 
float cx
 
float cy
 
struct rlSvgPosition::rlPositionInit init
 

Detailed Description

This class holds the position of an SVG object.
Use it together with rlSvgAnimator::setMatrix()

Definition at line 27 of file rlsvganimator.h.

Constructor & Destructor Documentation

◆ rlSvgPosition() [1/2]

rlSvgPosition::rlSvgPosition ( )

Definition at line 52 of file rlsvganimator.cpp.

◆ rlSvgPosition() [2/2]

rlSvgPosition::rlSvgPosition ( float  sx_init,
float  a_init,
float  x0_init,
float  y0_init,
float  cx_init,
float  cy_init 
)

Definition at line 59 of file rlsvganimator.cpp.

60 {
61  sx = 1.0f;
62  alpha = x0 = y0 = cx = cy = 0.0f;
63  init.sx = sx_init;
64  init.alpha = a_init;
65  init.x0 = x0_init;
66  init.y0 = y0_init;
67  init.w = w_init;
68  init.h = h_init;
69 }
struct rlSvgPosition::rlPositionInit init

◆ ~rlSvgPosition()

rlSvgPosition::~rlSvgPosition ( )
virtual

Definition at line 71 of file rlsvganimator.cpp.

72 {
73 }

Member Function Documentation

◆ move()

void rlSvgPosition::move ( float  x,
float  y 
)

Definition at line 83 of file rlsvganimator.cpp.

84 {
85  x0 = x;
86  y0 = y;
87 }

◆ moveRelative()

void rlSvgPosition::moveRelative ( float  dx,
float  dy 
)

Definition at line 89 of file rlsvganimator.cpp.

90 {
91  x0 += dx;
92  y0 += dy;
93 }

◆ rotate()

void rlSvgPosition::rotate ( float  alpha,
float  cx,
float  cy 
)

Definition at line 105 of file rlsvganimator.cpp.

106 {
107  alpha = _alpha;
108  cx = _cx;
109  cy = _cy;
110 }

◆ scale()

void rlSvgPosition::scale ( float  s)

Definition at line 95 of file rlsvganimator.cpp.

96 {
97  sx = s;
98 }

◆ scaleRelative()

void rlSvgPosition::scaleRelative ( float  ds)

Definition at line 100 of file rlsvganimator.cpp.

101 {
102  sx *= ds;
103 }

◆ setInit()

void rlSvgPosition::setInit ( float  x0_init,
float  y0_init,
float  w_init,
float  h_init 
)

Definition at line 75 of file rlsvganimator.cpp.

76 {
77  init.x0 = x0_init;
78  init.y0 = y0_init;
79  init.w = w_init;
80  init.h = h_init;
81 }
struct rlSvgPosition::rlPositionInit init

Member Data Documentation

◆ alpha

float rlSvgPosition::alpha

Definition at line 33 of file rlsvganimator.h.

◆ cx

float rlSvgPosition::cx

Definition at line 33 of file rlsvganimator.h.

◆ cy

float rlSvgPosition::cy

Definition at line 33 of file rlsvganimator.h.

◆ init

struct rlSvgPosition::rlPositionInit rlSvgPosition::init

◆ sx

float rlSvgPosition::sx

Definition at line 33 of file rlsvganimator.h.

◆ x0

float rlSvgPosition::x0

Definition at line 33 of file rlsvganimator.h.

◆ y0

float rlSvgPosition::y0

Definition at line 33 of file rlsvganimator.h.


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