Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Drawing / July 2005

Tip: Looking for answers? Try searching our database.

Given a point[] for a ploygon draw it with rounded corners

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shiv Kumar - 28 Jul 2005 15:46 GMT
I need to be able to draw a polygon with rounded corners. That is given
(say) an array of points that form the polygon, I'd like to draw it such
that the corners are rounded (the radius needs to be configurable).

How would I go about doing this?
Signature

Shiv Kumar (THF Team)
http://www.dynamicarchitects.com

James Westgate - 28 Jul 2005 17:17 GMT
Loop through each point in a set of straight lines
For each each point, then work out the radius distance from the point to the
previuus point and next point, using a bit of trig (look into Math.Atan)

Draw
1. A line from the previous arc (or start point) to the radius - point.
2. An arc from the radius - to the radius + point

The graphicspath class would work best here
James

Signature

Create interactive diagrams and flowcharts with ERM Diagram at
http://www.crainiate.net

Take the ERM Tour at http://www.flowchartcontrol.com

>I need to be able to draw a polygon with rounded corners. That is given
>(say) an array of points that form the polygon, I'd like to draw it such
>that the corners are rounded (the radius needs to be configurable).
>
> How would I go about doing this?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.