MoveBy

void MoveBy(
const Vec2D &amount )

Moves the shape with the specified amount.

Examples

Shape myShape = ...;

// Move the shape 20 pixels to the right //
myShape.MoveByVec2D20.00.0 ));

// Move the shape 100 pixels to the left and 150 pixels down //
myShape.MoveByVec2D( -100.0150.0 ));

// Move the shape the same amount as above //
// while taking the game speed regulation in account //
float deltaTime = FpsCounter::GetDeltaTime();
myShape.MoveBy( deltaTime * Vec2D( -100.0150.0 ));


Other functions of the class Shape
Draw
Draws the shape filled with the specified color
DrawOutline
Draws the outline of the shape
RecordDraw
Records the results of Draw-function
MoveBy
Moves the shape
SetLineWidth
Sets the width of the outline of the shape
GetLineWidth
Returns the width of the outline of the shape
DrawRecord
Draws the latest record created by RecordDraw
RotateBy
Rotates the shape by the specified angle
TransformBy
Transforms the shape by a Placement


Questions about MoveBy? Click here.