Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GdiPlusX and TextMetrics
Message
From
25/02/2008 15:29:30
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
VFPX/Sedna
Title:
GdiPlusX and TextMetrics
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01296206
Message ID:
01296206
Views:
70
Hi All

I was looking at textmetric topic on MSDN. Is this structure/functionality covered in any part of GdiPlusX ?
Reason asking;
I need precise coordinates of string as it is drawn on Canvas.

If I draw string 'GDIPlusX Rocks!' at pixel 0,0 using Arial 16 / bold,
I want to know exactly what will be coordinates of bottom left and bottom-right pixels of hypotetic rectangle that string is drawn within.
(Like 'loPathRect' when you draw justified string/text)
.
.
* Create Font Object
local loFont as xfcFont
loFont = .font.New('Arial', 16 , .FontStyle.Bold )
oGfx.DrawString( 'GdiPlusX Rocks big time! :)' , loFont, loSolidBrush, .PointF.New( 0,0))
.
.
Also, How meny pixels are above letters, how meny pixels are below baseline.

FONTMETRIC() give static info in regard of fonts, but I was wandering if GdiPlusX has provisions for obtaining this kind of 'as you draw' or 'on the fly' coordinates.

TIA
Sergio




*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Next
Reply
Map
View

Click here to load this message in the networking platform