SetPosition

static void SetPosition(
float x, float y );

Set the position of screen contents.

The default position of the screen is x = 0.0, y = 0.0.

This function could be used to implement scrolling but the objects which are rendered outside of the screen will still be sent to the graphics card where they're discarted.

Examples

// Set the position of the screen contents to x = 200.0, y = 100.0 //
Transforms::SetPosition200.0100.0 );

// Set the position of the screen back to the original position //
Transforms::SetPosition0.00.0 );


Other functions of the class Transforms
SetPosition
Set the position of screen contents
SetRotation
Set the rotational angle of the screen contents
SetRotationPivot
Selects the pivot point of the screen rotation
SetStretch
Sets the stretch factor of the screen
SetTintColor
Tints the whole screen to a color
ResetPlacement
Disables all the active placement transformations
SetColorChannels
Sets the coefficients of the color channels
GetColorChannels
Returns the coefficients of the color channels
PushPlacement
Pushes the placement state of Transforms in a stack
PopPlacement
Pops the most recent placement state of Transforms from the stack


Questions about SetPosition? Click here.