Re: Draw a path with a Pen which has a width of 2?

From: Frank Hileman (frankhil_at_no.spamming.prodigesoftware.com)
Date: 03/09/05


Date: Wed, 9 Mar 2005 08:52:16 -0800

For a circle or rectangle, your drawn area will be larger than the geometry
(rectangle coordinates) by one half the pen width, in each direction. For a
polyline the difference can be even greater, if you are not using a LineJoin
of round, because of the pen mitering.

Regards,
Frank Hileman

check out VG.net: http://www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio .NET graphics editor

"Özden Irmak" <ozdenirmak(at)isnet.net.tr> wrote in message
news:%23bf373KJFHA.1340@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> I created a custom control and drawing it's border depending on the
> selection of BorderType...
>
> The border can also have different shapes such as Round, Circle,
> Rectangle, etc...
>
> When I draw this border, I first create a GraphicsPath outlining the
> border and than drawing the path using a pen object...
>
> The problem starts when my border width is bigger than 1 (Which is the Pen
> width). When I use a width of 2, the path is not drawn correctly. A part
> is drawn outer than visible area and more important for example circle
> shapes draw some extra lines, etc.
>
> I tried changin Pen Alignment but this has no effect...
>
> Is there any bug about this or am I missing something?
>
> Regards,
>
> Özden
>
>
>



Relevant Pages

  • Re: Circling a word in Word 2003
    ... If you don't insist on a circle, which would have to be a drawing ... you can put a rectangle around a word by using a border. ... Word MVP FAQ site: http://word.mvps.org ...
    (microsoft.public.word.docmanagement)
  • rectangle preview
    ... when i draw a new rectangle, the preview border lines are not visible (but ... drawing a new circle or line, ...
    (microsoft.public.powerpoint)
  • Re: Problem in user created edit box...
    ... Now i have two edit box in my dialog box i have to change the border ... box and again i called OnPaintmethod.In OnPaint method i have drawn ... the rectangle with the border. ...
    (microsoft.public.vc.mfc)
  • Re: Problem in user created edit box...
    ... Now i have two edit box in my dialog box i have to change the border ... box and again i called OnPaintmethod.In OnPaint method i have drawn ... the rectangle with the border. ...
    (microsoft.public.vc.mfc)
  • Re: Writing a logic for shape coordinates
    ... and slots (rectangle with a semi-circle) in the drawing and where ever ... I want to check if the hole is in the range of the sensor, ... ' Check if Little circle is completly outside or completly inside ... If LittleY - LittleR < RectY Then ...
    (microsoft.public.excel.programming)