Gets or sets a value indicating whether this figure is closed. A closed figure will make a difference only in case where the first and the last figure’s shapes are continuous shapes. In such case the first point of the first shape will be connected by a straight line from the last point of the last shape.
Applies the specified transformation to the shape.
Examples
This examples make use of GraphicsPath and Graphics class to create and manipulate Figures on an Image surface. Example creates a new Image (of type Tiff), clears the surface and draws paths with the help of GraphicsPath class. At the end DrawPath method exposed by Graphics class is called to render the paths on surface.
[C#]//Create an instance of FileStreamusing(System.IO.FileStreamstream=newSystem.IO.FileStream(@"C:\temp\output.tiff",System.IO.FileMode.Create)){//Create an instance of TiffOptions and set its various propertiesAspose.Imaging.ImageOptions.TiffOptionstiffOptions=newAspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);//Set the source for the instance of ImageOptionstiffOptions.Source=newAspose.Imaging.Sources.StreamSource(stream);//Create an instance of Image using(Aspose.Imaging.Imageimage=Aspose.Imaging.Image.Create(tiffOptions,500,500)){//Create and initialize an instance of Graphics classAspose.Imaging.Graphicsgraphics=newAspose.Imaging.Graphics(image);//Clear Graphics surfacegraphics.Clear(Color.Wheat);//Create an instance of GraphicsPath classAspose.Imaging.GraphicsPathgraphicspath=newAspose.Imaging.GraphicsPath();//Create an instance of Figure classAspose.Imaging.Figurefigure=newAspose.Imaging.Figure();//Add Shapes to Figure objectfigure.AddShape(newAspose.Imaging.Shapes.RectangleShape(newAspose.Imaging.RectangleF(10f,10f,300f,300f)));figure.AddShape(newAspose.Imaging.Shapes.EllipseShape(newAspose.Imaging.RectangleF(50f,50f,300f,300f)));figure.AddShape(newAspose.Imaging.Shapes.PieShape(newAspose.Imaging.RectangleF(newAspose.Imaging.PointF(250f,250f),newAspose.Imaging.SizeF(200f,200f)),0f,45f));//Add Figure object to GraphicsPathgraphicspath.AddFigure(figure);//Draw path with Pen object of color Blackgraphics.DrawPath(newAspose.Imaging.Pen(Aspose.Imaging.Color.Black,2),graphicspath);// save all changes.image.Save();}}