🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.graphics
Article #1

Text Extent?

#1
From: Ron Sawyer
Date: Thu, 06 Apr 2006 22:06
12 lines
1386 bytes
I am using C# to do some graphics development.  I have to output a small
graphic to a canvas and center a string under it.  In the windows API world
I would get the extent of the text (I think it was called GetTextExtent or
something similar, I'd have to look it up.)  I would use the resultant width
and height to help me center the text output.

For the life of me I can't figure out how to do this with .Net graphics
objects.

Can anyone tell me how or direct me to a resource to guide me?

Thanks!
Technical Details
Message-ID: <443590d2$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 13f327,8cefa56ffbdd0002,start
X-Google-Attributes: gid13f327,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Ron Sawyer" <XXXRSAWYER8128XQQXX@aol.com>
From: "Ron Sawyer" <XXXRSAWYER8128XQQXX@aol.com>
Newsgroups: borland.public.csharpbuilder.graphics
Subject: Text Extent?
Date: Thu, 6 Apr 2006 18:06:32 -0400
Lines: 14
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 68.67.88.125
Message-ID: <443590d2$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1144361170 68.67.88.125 (6 Apr 2006 15:06:10 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail