Solved

Draw smaller polygon inside larger one

Posted on 2006-07-03
2
298 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

623 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