At 03:59 μμ 9/11/2001 +0000, you wrote: >Phoebus R. Dokos wrote: > >Hello again and thanks for everyone that responded to my previous >question. > >The question now is: > >Is it possible to place the text cursor ABSOLUTELY according to a >given > >window or the screen (that is without using @#!@$~~!@## SCALE)???? > >For a given window, simply use CURSOR #channel,x,y >This positions the cursor like AT #channel,y,x (note reversed x,y >values, and use of PIXELS rather than character squares) > >A second version of CURSOR is very useful, since it allows you to >specify text to be placed using graphics co-ordinates and offset by a >given number of pixels. This lets you place text using the same >co-ordinates as LINE, POINT, ARC, CIRCLE etc. So if you are using >SCALE to create graphics, this is the best way to ensure text and >graphics are placed in the same positions. > >CURSOR #channel,x,y,x_offset,y_offset
Yes but as I said again for the above (and the below) CURSOR is useless due to the problems with SCALE on non 2:1 screens, In effect you print in East and it ends up West :-) For a small gui like the one I am experimenting with, which relies on bitmap graphics, it is ESSENTIAL that the text goes where I want it, else you'll end up having windows that can't be resized but only in increments allowed by the OS. I believe that the trick is to utilise as much OS routines as possible (minimizing thus the amount of time for calculations) >If you have a POINT 50,50: LINE TO 100,100 then CURSOR >#channel,50,50,0,0:PRINT"Text" would position text at the 50,50 point. >To avoid overwriting the point, move the text a few pixels with >something like CURSOR #channel,50,50,10,10:PRINT"Text" > >I'm not sure if this is what you meant, hope it helps anyway. One >final point - this version of cursor does not always work in >SuperBASIC on Sinclair ROMs. I think Turbo and QLiberator compile this >and fix the problem and it's also fixed in SBASIC (not sure about >Minerva BASIC) It is fixed for standard QL modes, for "exotic" resolutions, (like the one I'm using... hehe another story) Also for the fun of it, using ONLY S*basic, I was able to draw an absurd amount of windows (more complex than the one you saw) per minute :-)