![]() |
|
[A5] Exempt Bitmap from Transform |
Eric Johnson
Member #14,841
January 2013
![]() |
Hi there. I'm using a run-of-the-mill transform that doubles the scale of the display. void Routines::stretchDisplay(const int stretch_amount) { ALLEGRO_TRANSFORM transform; al_identity_transform(&transform); // Prepare to stretch the display by the given amount al_scale_transform(&transform, stretch_amount, stretch_amount); // Apply stretch al_use_transform(&transform); // EXAMPLE use: Routines.stretchDisplay(2); This doubles the scale (duh) }
What I'd like to do is exempt a particular bitmap from said transform; everything but X bitmap would be scaled. Would you mind pointing me in the right directory in achieving this? Thank you kindly.
|
Thomas Fjellstrom
Member #476
June 2000
![]() |
You can temporarily store that transform using al_store_state, set up an identity or ortho transform, use that, draw the bitmap, and then restore the state after. There may be another way, but I think that works. -- |
Peter Wang
Member #23
April 2000
|
Another fun thing to do is create a sub-bitmap, which would have an independent transform.
|
|