Hello World Example
Contents
[
Hide
]
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.
- Create an object of
Bitmap
class with the size of 1000x800 pixels. - Create an object of
Graphics
class from this bitmap. - Define a
Pen
object with parameters: colorBlue
and pen size of 2 pixels. - Use the
drawArc()
method ofGraphics
class object to Draw an Arc.
The resulting Arc image is saved to the PNG file: