How to draw an image

How to draw an image

         Several methods are available for drawing graphics primitives such as draw_line, draw_ellipse, draw_rect draw_arc, draw_bezier and draw_string. In the beginning, we create a graphic surface to draw an image and describe graphic properties. In our example, we will create a surface with a size of 100 x 100 pixels and a color depth of 32 bits per pixel and set the background to yellow color with Clear method. Next, we define a drawing tool - a Pen object with a Blue color, to draw a dotted line or use SolidBrush for continuous lines with different colors, followed by X and Y coordinates of the start and end points of the lines:

         A more detailed description of how to draw graphic elements such as lines, ellipses, Bezier curves and text strings, you can find in the Aspose Imaging Developer Guide.

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

image with lines, ellipses and rectangles drawings