|
-
May 27th, 2010, 02:07 AM
#1
Thread Starter
Addicted Member
-
May 27th, 2010, 04:28 AM
#2
Re: Font Size in MM
 Originally Posted by DanDanDan1
Anyone got any ideas?
Yes. It's due to the miter setting. GraphicsPath.GetBounds returns a "loose fit" because the corners of the path could conceivably stick out a long way at sharp bends. I think you can fix it either by specifying the Pen parameter to a value of 1 (or less?); or by setting Path.Flatten to a low value, something like 0.01.
BB
-
May 27th, 2010, 09:12 AM
#3
Re: Font Size in MM
Here's the correct way to do it:
vb.net Code:
Using pn As New Pen(Color.Black, 1) With {.MiterLimit = 1}
boundRectF = myPath2.GetBounds(New Drawing2D.Matrix, pn)
End Using
The default value for MiterLimit is 10, which results in the actual bounds being inflated by 10 x the (default) Pen width all round.
BB
-
May 27th, 2010, 10:32 AM
#4
Thread Starter
Addicted Member
Re: Font Size in MM
Thanks alot but have now sorted this using a different method.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|