Results 1 to 7 of 7

Thread: [RESOLVED] Font Size in MM

Hybrid View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2002
    Posts
    129

    Re: Font Size in MM

    Anyone got any ideas?

  2. #2
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: Font Size in MM

    Quote Originally Posted by DanDanDan1 View Post
    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

  3. #3
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: Font Size in MM

    Here's the correct way to do it:

    vb.net Code:
    1. Using pn As New Pen(Color.Black, 1) With {.MiterLimit = 1}
    2.             boundRectF = myPath2.GetBounds(New Drawing2D.Matrix, pn)
    3.         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

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Dec 2002
    Posts
    129

    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
  •  



Click Here to Expand Forum to Full Width