|
|
| Display coordinate origin? |
|
AleaInfinitus
Member #18,873
December 2020
|
I couldn't find anything directly related to this in the docs, and looking it up showed a similar question where someone said that the pixel coordinates start at (1,1). Does the display do the same? Would a mouse click on the top left pixel of a display count as (1,1) or (0,0)? |
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
0,0 is the origin in allegro, starting at the upper left My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|
Chris Katko
Member #1,881
January 2002
|
AleaInfinitus said: someone said that the pixel coordinates start at (1,1) Where did you see that? It should be (0,0) or (0.5, 0.5) (see the primatives addon docs because "pixels" in 3D APIs have to be "centered" on the pixel or anti-aliasing will screw up. In that case, simply add 0.5 at the end. But since I don't use anti-aliased lines I've never even had the problem show up.) There are things like (-1,-1) to (1,1) floating point device space and stuff like that but since Allegro is already setting up the "transforms" you should only have to specify the usual screen/window coordinates. -----sig: |
|
|