Free Support Forum - aspose.com

How to create custom shapes?

How can I create a custom shape … for example a map of several countries. Each country would have an irregular shape. I need to fill each country with a color as determined by information comming from my database. Using pictures is not working since the square shape of the image overlaps the adjacent countries. If I had this as a shape object I could access the fill color and change that programatically.
appreciate the help

Try adding polyline, using Slide.Shapes.AddPolyLine() method.

how do i create the coordinates ? i see that i need graphics path … but what is the syntax for that?

GraphicsPath is a class in System.Drawing.Drawing2D namespace. You should search on internet, how to make use of it. e.g see if this link is helpful. http://www.publicjoe.f9.co.uk/csharp/cs26a.html

I have the following but I cannot get the polygon shape to have a filled in background color

Dim points As Drawing.Point() = {New Drawing.Point(23, 20), New Drawing.Point(40, 10), _
New Drawing.Point(57, 20), New Drawing.Point(50, 40), New Drawing.Point(30, 40)}
Dim graphpath As New Drawing.Drawing2D.GraphicsPath
graphpath.AddPolygon(points)
Dim test As Aspose.Slides.Polyline = ObjectiveSlide.Shapes.AddPolyline(1000, 1000, 1500, 1500, graphpath)
test.FillFormat.BackColor = Drawing.Color.Blue

any help with this??

Dear southcom,

I have requested the technical team lead to help you in this regard and you will be helped as soon as possible. Thanks for your patience.