Adding graphics enhances the appearance of a document and make them visually appealing. You can add various types of shapes in your documents such as, Arc, Beizer, Ellipse, Line, Pie, polygon, PolygonLine, and Rectangle. Use the following code to add graphics such as pie, rectangles, polyline, and beziers along with the text:
In the above code, DrawRectangle, DrawArc, DrawPolyline, and DrawBeziers methods are used to draw graphics of different types such as, line, rectangle, pie, and bezier. Besides, DrawString method is used to draw and show text in the document.
The output of the above code will look similar to the image given below: