GT::Graphics::Graphic

A graphic is composed of a layout of zones. Objects are affected to the various zones. Those objects may be displayed. The display engine may use an associated default scale to obtain coordinates of points to draw.

GT::Graphics::Graphic->new($zone)

Create a new graphic using the specified zone layout.

$graphic->set_zone($zone)

Define the layout of the display zones. You shouldn't call this once you added graphical objects because objects may reference zones that are no more part of the new layout.

$graphic->set_background_color($color)

Set the background color of the graphic.

$graphic->add_object($object)

Add a graphical object to the graphic.

$graphic->display($driver, $picture)

Display the graphic in the picture. It will display the zones and the graphical objects.