Hello World Example

Hello World Example

This “Hello World” example demonstrates the drawing capabilities of the Aspose.Drawing for Java API through a basic vector graphics creation.

The Aspose.Drawing Graphic Library for Java is a comprehensive tool for image manipulation and vector drawing. It facilitates the creation of vector graphics primitives like lines, curves, and figures by defining sets of points on a coordinate system. Additionally, it allows the display of text in various fonts, sizes, and styles, and provides the capability to save drawing results in popular graphics file formats. The subsequent example illustrates the process of drawing an arc in Java through the following steps.

  1. Create an object of Bitmap class with the size of 1000x800 pixels.
  2. Create an object of Graphics class from this bitmap.
  3. Define a Pen object with parameters: color Blue and pen size of 2 pixels.
  4. Use the drawArc() method of Graphics class object to Draw an Arc.

The resulting Arc image is saved to the PNG file:

Drawing Arc with Java

Example of drawing Arc with Java