Post Reply 
Graphics coordinates vs Pixels coordinates
03-20-2019, 01:45 AM
Post: #2
RE: Graphics coordinates vs Pixels coordinates
The graphic coordinates are oriented to applications, that is why not all of them are configured in the same way and care must be taken with this (programming directly on an app).

(03-19-2019 11:57 AM)Oulan Wrote:  I thinks that the graphical units do not use the full vertical size of the screen (to keep some space to draw the menus ?)
Exactly, 21 pixels height menu, the calculator in some cases pushes us to use DRAWMENU, as well as the WAIT (-1) or MOUSE when touch in that area.

(03-19-2019 11:57 AM)Oulan Wrote:  It seem ok to do so, but for ARC vs ARC_P with the radius given in PIXELS and not in graphical units there is some discrepancy
I agree, had not noticed, in the Geometry App your solution is simple.

----------------------

There are Apps that are not graphically configurable, for this case I would recommend the Geometry App, it always has a square relationship and allows defining the pixel size and only one corner point. Assuming the menu height of 21 pixels, a full screen and a circle, it can be set up in this way:

Code:
PixSize:=.1;
Xmin:=-16;
Ymin:=-12+21*PixSize;
LOCAL r=2;
RECT;
ARC(0,0,r/PixSize);
TEXTOUT("r="+r,0,-r);
FREEZE;

It is timely to mention that even when working with decimal coordinates, a conversion to pixel of integer coordinate is performed; also that the Xmin+320*PixSize will drop a pixel off the screen.

Viga C | TD | FB
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Graphics coordinates vs Pixels coordinates - Carlos295pz - 03-20-2019 01:45 AM



User(s) browsing this thread: 1 Guest(s)