Solved

Draw smaller polygon inside larger one

Posted on 2006-07-03
2
294 Views
Last Modified: 2010-04-23
These are points for a 5x sided polygon, Im using "g.DrawPolygon(Pens.Black, some_Points)" to draw it on the screen. In my program they change whenever you resize or move the polygon.
70, 160
150, 100
280, 100
280, 230
70, 230

How should I draw a smaller dotted line around the inside edge of this polygon? I realise I can use g.DrawPolygon again but I cant think of a way to work out the new points for the inside shape :)

If a picture helps, Im trying to draw the inner dashed line kind of like this:
http://i65.photobucket.com/albums/h219/photocosi/testroof2.png

0
Comment
Question by:craigdev
2 Comments
 
LVL 12

Accepted Solution

by:
omegaomega earned 500 total points
ID: 17035378
Hello, Craig,

I would try creating a GraphicsPath object from the points of your polygon.  (See the AddPolygon method of the GraphicsPath object.)  Then you could use the Transform method to scale and translate the path into the new size and position.

Cheers,
Randy
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question