![]() |
Forum Index : Microcontroller and PC projects : Y-Axis Flipped in PicoMite
Author | Message | ||||
toml_12953 Guru ![]() Joined: 13/02/2015 Location: United StatesPosts: 382 |
In MMBasic, the Y-Axis is reversed from the usual orientation so that y=0 is the top of the screen. In some variants of MMBasic, there's a OPTION Y_AXIS UP command that flips the Y-Axis so it follows the usual Cartesian coordinate system. PicoMite doesn't have this option. Is there any chance of getting it in a future release? Edited 2025-04-28 20:37 by toml_12953 |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9992 |
The only version with that option is the CMM2 and that was done specifically at the request of a teacher for use in school. All other versions of MMBasic behave like the PicoMite as do historical versions of Basic like BBC Basic. It adds significant complexity so the answer is no. |
||||
stanleyella![]() Guru ![]() Joined: 25/06/2022 Location: United KingdomPosts: 2389 |
y0=screen height-1 Edited 2025-04-29 07:48 by stanleyella |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2407 |
If writing to the screen from an array MATH WINDOW can be used to both scale the data to fit the desired display area and invert it so 0 is at the bottom. Edited 2025-04-29 08:32 by phil99 |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2137 |
This solves your problem, adds very little time-wise in the drawing etc and harks back to the screens of the 80s & 90s I use it all the time as it is just more logical for my old brain they co-habit very nicely with the existing graphic commands and i generally inter-mingle them as I see fit, so I end up with "sensible"-looking stuff like this (which makes much sense to my addled gourd): Sub ButtonDown(x As Integer,y As Integer,w As Integer,h As Integer,t$,col As Integer) Move x+(w/2)-MM.FONTWIDTH*(Len(t$)/2),y+(h/2)+MM.FONTHEIGHT/2 Colour col,cGy Text Gx,Gy,t$ Move x,y DrawR 0,h:DrawR w,0 Colour &hffffff DrawR 0,-h:DrawR -w,0 End Sub h Edited 2025-04-29 18:47 by CaptainBoing |
||||
![]() |