Post Reply 
TEXTOUT_P & TEXTOUT with Left, Right & Centre Justification
08-23-2023, 02:42 PM
Post: #6
RE: TEXTOUT_P & TEXTOUT with Left, Right & Centre Justification
(08-23-2023 11:18 AM)Insoft Wrote:  
(08-23-2023 11:11 AM)matalog Wrote:  TEXTOUT_P("String",X,Y) Returns the X coordinate at which the next character of the string should be drawn if the string had more characters (from the calculators built in help).

That will work with the same text on a different correctly defined GROB if you don't want it to be printed on the current GROB and it will work with the different font sizes.

That’s what I was previously doing, I found that I could actually just draw off screen and still return the X coordinate and I was using that as a workaround tho TEXTSIZE seems what I should be using from what I can tell and it gives me the height which I may require one day tho with fixed font sizes I don’t see height being any real benefit in reality.
Me too:

Code:

GetWidthPix(Cadena, Fuente) //Obtiene el ancho en pixeles de una cadena Font=1
BEGIN
  LOCAL xAncho; 
  DIMGROB_P(G7,319,239,RGB(255,255,255)); 
  RECT_P(G7);
  xAncho := TEXTOUT_P(Cadena,G7,0,0,Fuente, RGB(0,0,255));
  RETURN xAncho;
END
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: TEXTOUT_P & TEXTOUT with Left, Right & Centre Justification - HPCarnace - 08-23-2023 02:42 PM



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