GraphicsPath::GetBounds() returns too large a rectangle - 12-18-2009 , 02:20 AM
If I call GraphicsPath::GetBounds() with no transform matrix and a pen, as
result = myPath.GetBounds(&myRect, NULL, &myPen);
I get a rectangle that's much larger (generally several pixels on each side)
than the path I defined. I've set the pen width to 0.5 and I have
If I make the same call without the pen, i.e.
result = myPath.GetBounds(&myRect);
I get exactly what I expect, although the pen thickness is not taken into
Is this a known problem, or am I missing something?
Re: GraphicsPath::GetBounds() returns too large a rectangle - 01-19-2010 , 08:44 AM
On Dec 18 2009, 9:20*am, nomad <no... (AT) discussions (DOT) microsoft.com>
pen width. A look in msdn gives the answer: the pen width is
multiplied by the MiterLimit and the default for that is apparently
10. So the solution is to set your pen's MitreLimit property to 1
before measuring the bounds.
|Thread Tools||Search this Thread|