al_use_transform - Man Page

Allegro 5 API

Synopsis

#include <allegro5/allegro.h>

void al_use_transform(const ALLEGRO_TRANSFORM *trans)

Description

Sets the transformation to be used for the the drawing operations on the target bitmap (each bitmap maintains its own transformation). Every drawing operation after this call will be transformed using this transformation. Call this function with an identity transformation to return to the default behaviour.

This function does nothing if there is no target bitmap.

The parameter is passed by reference as an optimization to avoid the overhead of stack copying. The reference will not be stored in the Allegro library so it is safe to pass references to local variables.

void setup_my_transformation(void)
{
   ALLEGRO_TRANSFORM transform;
   al_translate_transform(&transform, 5, 10);
   al_use_transform(&transform);
}

Parameters:

See Also

al_get_current_transform(3), al_transform_coordinates(3)

Referenced By

al_attach_shader_source(3), al_build_camera_transform(3), al_get_current_transform(3), al_identity_transform(3), al_transform_coordinates(3), al_transform_coordinates_3d(3), al_transform_coordinates_3d_projective(3), al_transform_coordinates_4d(3).

Allegro reference manual