rllib  1
Classes | Public Member Functions | Public Attributes
rlSvgPosition Class Reference

#include <rlsvganimator.h>

Collaboration diagram for rlSvgPosition:
Collaboration graph
[legend]

List of all members.

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::rlSvgPosition ( )

Definition at line 52 of file rlsvganimator.cpp.

{
  sx = 1.0f;
  alpha = x0 = y0 = cx = cy = 0.0f;
  init.sx = init.alpha = init.x0 = init.y0 = init.w = init.h = -1;
}
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.

{
  sx = 1.0f;
  alpha = x0 = y0 = cx = cy = 0.0f;
  init.sx = sx_init;
  init.alpha = a_init;
  init.x0 = x0_init;
  init.y0 = y0_init;
  init.w = w_init;
  init.h = h_init;
}
rlSvgPosition::~rlSvgPosition ( ) [virtual]

Definition at line 71 of file rlsvganimator.cpp.

{
}

Member Function Documentation

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

Definition at line 83 of file rlsvganimator.cpp.

{
  x0 = x;
  y0 = y;
}
void rlSvgPosition::moveRelative ( float  dx,
float  dy 
)

Definition at line 89 of file rlsvganimator.cpp.

{
  x0 += dx;
  y0 += dy;
}
void rlSvgPosition::rotate ( float  alpha,
float  cx,
float  cy 
)

Definition at line 105 of file rlsvganimator.cpp.

{
  alpha = _alpha;
  cx = _cx;
  cy = _cy;
}
void rlSvgPosition::scale ( float  s)

Definition at line 95 of file rlsvganimator.cpp.

{
  sx = s;
}
void rlSvgPosition::scaleRelative ( float  ds)

Definition at line 100 of file rlsvganimator.cpp.

{
  sx *= ds;
}
void rlSvgPosition::setInit ( float  x0_init,
float  y0_init,
float  w_init,
float  h_init 
)

Definition at line 75 of file rlsvganimator.cpp.

{
  init.x0 = x0_init;
  init.y0 = y0_init;
  init.w = w_init;
  init.h = h_init;
}

Member Data Documentation

Definition at line 33 of file rlsvganimator.h.

Definition at line 33 of file rlsvganimator.h.

Definition at line 33 of file rlsvganimator.h.

Definition at line 33 of file rlsvganimator.h.

Definition at line 33 of file rlsvganimator.h.

Definition at line 33 of file rlsvganimator.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines