How to draw an image

How to draw an image

         With Aspose.Imaging you can use several methods to draw graphics primitives such as DrawLine, DrawEllipse, DrawRectangle, DrawArc, DrawBezier and DrawString. You need to create a graphic surface to draw an image from scratch and set up graphic properties. We will create a surface of 100 x 100 pixels with 32 bits per pixel in our example and set the background to yellow color with Clear method. Then we can define a drawing tool, for example, a Pen with a Blue color, to draw a dotted line or use SolidBrush for continuous lines with different colors, followed by X, Y coordinates of the start and end points of the lines:

         A more detailed description of drawing lines, ellipses, rectangles, arcs, Bezier curves and text strings, you can find in the Aspose drawing images documentation.

Example image with lines, ellipses and rectangles drawings on transparent background:

image with lines, ellipses and rectangles drawings