Screen coordinates
-
@Discostew But the point is that the coordinate system is 1-based, not 0-based as the documentation says.
In docked mode (1080p)
plot(200, 1080, white)
will result in a visible dot at the bottom of the screen. If it would have been a 0-based coordinate system, that dot wouldn't show up.
-
Hmm, just checked, it does range from 1-1080 (docked) on the y axis, and 1-1920 on the x. Yet on the HELP page for plot(), it randomizes the x/y destination based on the screen dimensions, but random() ranges from 0 to one less than the inputted value. Guess we can ask if this is a bug, but in the meantime, if you use 0-based plotting, you can always just add 1 to the overall X/Y coordinates.
-
Really...?! - you have got to be kidding! this should be 0 to 1919 etc. We will have to fix that.
-
@Jonboy Yes I have noticed that this morning
-
@Jonboy Hehe, it should be an easy fix, yeah?
-
@Jonboy said in Screen coordinates:
Really...?! - you have got to be kidding! this should be 0 to 1919 etc. We will have to fix that.
but then you'll either need to change gheight/gwidth to return the 0 based value, or we'll need to start subtracting 1 from it?
-
@Myddrak gheight/gwidth are dimensions, not coordinates.
-
-
If I were drawing to the screen, I would start at 0 and finish at gwidth(), since that would be 0 to gwidth()-1
for a = 0 to gwidth() loop print(a) repeat
would output (sort of)
0 1 2 .... 1918 1919
-
sorry, my mistake, I missed where for loops don't include the boundary... all good :)
-
@Myddrak said in Screen coordinates:
sorry, my mistake, I missed where for loops don't include the boundary... all good :)
To be fair, I’d say it is a little on the quirky side but just one of those things. As long as you know, it’s easy enough to live with.