GT::Graphics::Object

A graphical object is a part of a graphic. It can display itself on a picture.


FUNCTIONS TO IMPLEMENT

Each object will have to implement those functions.

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

Display the object on the picture using the given driver. It may use $o->{'zone'} and $o->{'source'} to get the data and display itself in the good zone.

$o->init(...)

This function is called with the trailing arguments given to the constructor.


GENERIC FUNCTIONS

GT::Graphics::Object::<Something>->new($datasource, $zone, ...)

The constructor.

$o->get_z_level()

$o->set_z_level($z)

Those two functions are used to manage the order in which the orders are displayed. An object with a low Z level is drawn first.

$o->set_source($source)

$o->get_source()

Set/get the datasource associated to this object.

$o->set_zone($zone)

Set the zone in which the object will be displayed.

$o->set_special_scale($scale)

Use a special scale to draw this object.

$o->get_scale()

Return the associated scale. If it exists, it uses the special scale, otherwise returns the default scale associated to the zone.

$o->set_background_color($color)

Use this color as background color.

$o->set_foreground_color($color)

Use this color as foreground color.