U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Printing / Get Text length?
Printing / Get Text length? [message #20222] Sat, 28 February 2009 13:11 Go to next message
kbyte is currently offline  kbyte
Messages: 87
Registered: July 2008
Member
Hi,
I am printing something and I need to know how much printer units a specific string measures.

Having a:

PrinterJob pd("Sample");
Draw& w=pd.GetDraw();

how does we get the length in printer units of a string to be printed?

Many thanks

Alex
Re: Printing / Get Text length? [message #20280 is a reply to message #20222] Fri, 06 March 2009 18:16 Go to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
GetTextSize. Or, if you wish more sophisticated text layout, use FontInfo...

Note that "printer units" are dots, basically pixels on 600dpi printer (if printer does not have 600dpi, it is being converted).

Mirek
Previous Topic: Win32 / Linux layouts
Next Topic: Like PromptOK, but whit "Ok" and "Cancel"
Goto Forum:
  


Current Time: Tue May 05 14:17:49 GMT+2 2026

Total time taken to generate the page: 0.00523 seconds