Post Reply 
Parameters of the TEXTSIZE
03-16-2024, 07:47 PM
Post: #4
RE: Parameters of the TEXTSIZE
Hi Piotr,

I didn't know the problem with 2D. Inconsistencies is a dominating characteristic of the PRIME. It's such a pity, as Tim and Cyrille were obviously very capable developers. But you can't be successful once your management doesn't provide the necessary resources. An indication of the problems may be that we haven't heard anything from Moravia for quite a while. Perhaps they realize that's a mission impossible to rectify the problems with their intended man power.

BTW: in my little Python program on L-System fractals using TEXTSIZE was rather convenient to have centered and right aligned TEXTOUT. A short snippet.
Code:
import hpprime as hp
def strip(arg): 
   return str(arg)[1:-1]

def TxtOut(t,x,y,f,c,*args):
   if len(args)>2:
      raise(SyntaxError("too many arguments"))
   if True in [isinstance(i,list) for i in t]:
      raise(TypeError("can't convert 'list' object to str implicitly")) 
   parms=(int(x),int(y),int(f),int(c))
   if len(args)>0:parms+=(int(args[0]),)
   if len(args)>1:parms+=(int(args[1]),)
   return hp.eval('TEXTOUT_P('+string(t)+','+strip(parms)+')')

def TxtRight(t,x,y,f,c,*args):
   x -= hp.eval('TEXTSIZE('+string(t)+','+str(f)+')')[0]
   TxtOut(t,x,y,f,c,*args)

def TxtCenter(t,x,y,f,c,*args):
   x  -=  (hp.eval('TEXTSIZE('+string(t)+','+str(f)+')')[0])/2
   TxtOut(t,x,y,f,c,*args)
Günter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Parameters of the TEXTSIZE - komame - 03-14-2024, 09:14 PM
RE: Parameters of the TEXTSIZE - komame - 03-16-2024, 05:35 PM
RE: Parameters of the TEXTSIZE - Guenter Schink - 03-16-2024 07:47 PM
RE: Parameters of the TEXTSIZE - komame - 03-18-2024, 06:45 AM
RE: Parameters of the TEXTSIZE - Tyann - 03-31-2024, 01:06 PM
RE: Parameters of the TEXTSIZE - komame - 03-31-2024, 06:37 PM



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