Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: 13975
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: Thu Mar 28 22:59:53 CET 2024

Total time taken to generate the page: 0.01620 seconds