Hello World Example
Contents
[
Hide
]
Hello World Example
This “Hello World” example introduces the drawing features of Aspose.Drawing for .NET API with a simple vector graphics drawing.
Aspose.Drawing for .NET is a feature-rich image manipulation and vector drawing library that is used to draw vector graphics primitives such as lines, curves, and figures. These are specified by sets of points on a coordinate system, to display text in a variety of fonts, sizes, and styles, and to save drawing results in commonly used graphics file formats. This example shows how to draw an arc using C# with the following steps.
- Instantiate an object of Bitmap class
- Initialize an object of Graphics class from this bitmap
- Define a Pen object with desired parameters
- Use the DrawArc method of Graphics class object to draw an arc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-drawing/Aspose.Drawing-for-.NET | |
using System.Drawing; | |
Bitmap bitmap = new Bitmap(1000, 800, System.Drawing.Imaging.PixelFormat.Format32bppPArgb); | |
Graphics graphics = Graphics.FromImage(bitmap); | |
Pen pen = new Pen(Color.Blue, 2); | |
graphics.DrawArc(pen, 0, 0, 700, 700, 0, 180); | |
bitmap.Save("DrawArc.png"); |