Post Reply 
TEXTOUT_P()
04-29-2022, 07:59 PM (This post was last modified: 04-29-2022 09:38 PM by matalog.)
Post: #2
RE: TEXTOUT_P()
This little program highlights the problem:

Code:
EXPORT textest()
BEGIN
LOCAL ab:=0;
LOCAL cd:=0;
LOCAL str:="abcdefg";
rect();
ab:=TEXTOUT_P(str,G8,0,0,0);
cd:=TEXTOUT_P(str,G8,0,60,4);
TEXTOUT_P(string(ab)+" VS "+string(cd),120,120,0);
WAIT(-1);
FREEZE;
END;

This results in the same number being printed twice - 42 VS 42.

Now, I realise that TEXTOUT_P here is not being used to refer to the current screen G0, but this is the only way I could see to return the number of pixels to the end of the string without having to print the numbers to the screen.

If I put the TEXTOUT_P's on G0 instead of G8, then the numbers are different 42 VS 56.

This should work the same whether the TEXTOUT_P is on G0 or G8, this is a bug.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
TEXTOUT_P() - matalog - 04-29-2022, 11:38 AM
RE: TEXTOUT_P() - matalog - 04-29-2022 07:59 PM
RE: TEXTOUT_P() - Guenter Schink - 04-30-2022, 05:14 PM
RE: TEXTOUT_P() - matalog - 05-01-2022, 02:53 PM



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