Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » [5] How rotate an allegro display ?

Credits go to pkrcel and Thomas Fjellstrom for helping out!
This thread is locked; no one can reply to it. rss feed Print
[5] How rotate an allegro display ?
Fred58
Member #11,939
May 2010

Hello,

i learn how events are coding on allegro 5 and i see that kind of event :

ALLEGRO_EVENT_DISPLAY_ORIENTATION

and property of display :
event.display.orientation

Contains one of the following values:

ALLEGRO_DISPLAY_ORIENTATION_0_DEGREES
ALLEGRO_DISPLAY_ORIENTATION_90_DEGREES
ALLEGRO_DISPLAY_ORIENTATION_180_DEGREES
ALLEGRO_DISPLAY_ORIENTATION_270_DEGREES
ALLEGRO_DISPLAY_ORIENTATION_FACE_UP
ALLEGRO_DISPLAY_ORIENTATION_FACE_DOWN

how is it possible to rotate an allegro display ?
(i am under visual studio 2013 and windows 8.)

Thank you.

pkrcel
Member #14,001
February 2012

The events are intended to catch the rotation of the display by the undelying operative system, tipically on mobile platforms (Android & iOS) I presume, even thou it's possible to rotate the display also on Windows I currently don't know if Allegro catches such events on this platform.

I don't think (if I understood you corrcetly) that there's a method in Allegro API that lets YOU change the orientation.

It is unlikely that Google shares your distaste for capitalism. - Derezo
If one had the eternity of time, one would do things later. - Johan Halmén

Thomas Fjellstrom
Member #476
June 2000
avatar

Yes, those events are if the device itself detected a physical orientation change.

If you want to rotate your drawing, use ALLEGRO_TRANSFORM s.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Fred58
Member #11,939
May 2010

thank you very much, Allegro is a wonderful library full of surprises !

Fred

Go to: