On Fri, Feb 11, 2011 at 3:19 AM, Lee Privett <[email protected]> wrote:
> With regard to your text going off screen, one solution would be to use > (something I am currently working on but not yet finished) drawn text, using > either turtle graphics or line command etc. > > In simple terms the algorythm below hopefully shows what I mean, and you > will need a draw routine for each character you are going to use, if you use > variables in the draw routine then it makes it adaptable for resizing and it > is also then possible to make the text proportional and at any angle as well > as going completely off screen without error. Scale becomes a factor here. > > DEFine FUNCTION DPRINT (x,y,text$) > REMark check each character in text$ > for f = 1 to length txt$ > Select on char > draw char at x,y coord:leave cursor x,y at same point plus length of char > in the direction you want the text to go > end select > end for f > REMark next char > END DEFine > > There maybe suitable programs that do this, either in PD on Dilwyns site or > from the Quanta Library however the one I have found does not work well for > me and I have not found anything else to do it. > > I originally wrote the full function in Microsoft QuickBasic and it works > very well, but the process of converting to S*Basic is slow and a low > priority at the moment. If you want the QuickBasic version I am happy to > provide. > > > Lee Privett > I considered this approach and wrote a couple of test procedures. It was very slow. The best I have come up with is to construct the two strings for the two lines of data, then, when I know the plotting position, I can know the remaining width of the screen. At that point I can either limit the caption's movement but allow the plane to fly on, or crop the strings shorter by 1 character for each 6 pixels closer so only the individual character at the edge of the screen blinks out. I wish there was a PRINT_NE version of print that would not throw errors if things were off-window, and that would allow negative CURSOR and AT values. Dave _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
