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
- Next message: Olaf Rabbachin: "Size and position of a scaled image (after Transform)?"
- Previous message: Özden Irmak: "Draw a path with a Pen which has a width of 2?"
- In reply to: Özden Irmak: "Draw a path with a Pen which has a width of 2?"
- Messages sorted by: [ date ] [ thread ]
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
>
>
>
- Next message: Olaf Rabbachin: "Size and position of a scaled image (after Transform)?"
- Previous message: Özden Irmak: "Draw a path with a Pen which has a width of 2?"
- In reply to: Özden Irmak: "Draw a path with a Pen which has a width of 2?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|