OpenLayer Offline Manual

OpenLayer | Shape | MoveBy 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.MoveBy( Vec2D( 20.0, 0.0 )); // Move the shape 100 pixels to the left and 150 pixels down // myShape.MoveBy( Vec2D( -100.0, 150.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.0, 150.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
Back to the main page of the manual Questions about MoveBy? Click here.