Solved

Draw smaller polygon inside larger one

Posted on 2006-07-03
2
297 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

738 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