Post Reply 
Python: TEXTOUT_P, CHOOSE, INPUT here is how it works 22.jan addded a TextOut functio
01-24-2022, 10:44 PM
Post: #6
RE: Python: TEXTOUT_P, CHOOSE, INPUT here is how it works Correction 17.Jan 2022
(01-24-2022 06:34 PM)jfelten Wrote:  Supposedly, one of the recent firmware versions allows you to also change the formatting of the text (bold, italic, alignment, monospace, etc.), although I haven't been able to get that to work at all. Would you be able to take a look at that and explain how it works?

I had a look at it and quite frankly I couldn't decipher how that was supposed to work. Here is how it is described.

Quote:A new form of TEXTOUT:

TEXTOUT(object_to_print, [G], x, y, {["2D"], [{print out flags as in string}], [font], [c1], [width], [c2], flags}

Allows 2D printing, specification of the transformation from object to string (as in the STRING function), but also the “flag” parameter, which is a bit field allows to select various options:

elipsis= (flags&1)!=0;
NoPadding= (flags&2)!=0;
ClipLastChar= (flags&4)!=0;
centered= (flags&8)!=0;
rightaligned= (flags&16)!=0;
PointIsNotTopLeft= (flags&32)!=0;
Underline= (flags&64)!=0;
StrikeThrough= (flags&128)!=0;
Bold= (flags&256)!=0;
italic= (flags&512)!=0;
mono= (flags&1024)!=0;
EraseFullWidth= (flags&2048)!=0;

PRINT2D prints in 2D and allows some selection of format

print(object, [font], [color], flags(bold:1, underscore:2, strikethrough:4, centered: 8, right:16;)

note that some of the flags (bold, underscore, strike) only work when the object is a string).

If someone could decipher it, with working examples I'd be happy. And could give it a try

Günter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Python: TEXTOUT_P, CHOOSE, INPUT here is how it works Correction 17.Jan 2022 - Guenter Schink - 01-24-2022 10:44 PM



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