Chart::BrushStyles Class Reference

- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

List of all members
Chart::BrushStyles Class Reference

Define styles for Points and LinesPoints classes. More...

Inheritance diagram for Chart::BrushStyles:
[legend]
Collaboration diagram for Chart::BrushStyles:
[legend]

## Public Functions
| OpenCircle
| Set the gdBrush object to have nice brushed object representing a circle of the size $radius.
| FilledCircle
| Set the gdBrush object to have nice brushed object representing a point of the size $radius.
| Star
| Set the gdBrush object to have nice brushed object representing a star of the size $radius.
| FilledDiamond
| Set the gdBrush object to have nice brushed object representing a filled diamond of the size $radius.
| OpenDiamond
| Set the gdBrush object to have nice brushed object representing a diamond of the size $radius-1.
| OpenRectangle
| Set the gdBrush object to have nice brushed object representing a rectangle of the height $radius-1 and width of $radius/2.

## Additional Inherited Members
Public Member Functions inherited from Chart::Base
object | new ()
| Standard normal constructor. Calls.
int | set (hash opts)
| Set all options.
hash | getopts ()
| get all options
int | add_pt (list data)
| Graph API Add one dataset (as a list) to the dataref.
| add_pt (\\\list data)
| Graph API Add one dataset (as a reference to a list) to the dataref via.
int | add_dataset (list data)
| Graph API Add many datasets (implemented as a list) to the dataref,.
int | add_dataset (\\\list data)
| Graph API Add many datasets (implemented as a references to alist) to the dataref,.
int | add_datafile (scalar filename, scalar format)
| Graph API it's also possible to add a complete datafile Uses.
int | clear_data ()
| Clear Graph API (by undefining 'dataref'.
arrayref | get_data ()
| Get array of data of the last graph.
int | png (scalar file, scalar dataref)
| Produce the graph of options set in png format.
int | cgi_png (scalar dataref)
| Produce the graph of options set in png format to be directly written for CGI.
int | scalar_png (scalar dataref)
| Produce the graph of options set in PNG format to be directly returned.
int | jpeg (scalar file, scalar dataref)
| Produce the graph of options set in JPG format to be directly plotted.
int | cgi_jpeg (scalar dataref)
| Produce the graph of options set in JPG format to be directly for CGI.
int | scalar_jpeg (scalar dataref)
| Produce the graph of options set in JPG format to be directly returned.
int | make_gd (scalar dataref)
| Produce the graph of options set in GD format to be directly.
| imagemap_dump ()
| get the information to turn the chart into an imagemap
| minimum (list array)
| determine minimum of an array of values
| maximum (list array)
| determine maximum of an array of values
| arccos (scalar a)
| Function arccos(a)
| arcsin (scalar a)
| Function arcsin(a)
| true (scalar arg)
| determine true value of argument
| false (scalar arg)
| determine false value of argument
| modulo (scalar a, scalar b)
| Calculate float($a % $b) as the internal operator '' does only calculate in integers.
private int | _init (scalar x, scalar y)
| Initialize all default options here.
private int | _copy_data (scalar extern_ref)
| Copy external data via a reference to internal memory.
private array | _color_spec_to_rgb (scalar role, scalar spec)
| Return an array (list of) rgb values for spec.
private int | _draw_sub_title ()
| draw the sub-title for the chart
private int | _sort_data ()
| sort the data nicely (mostly for the pareto charts and xy-plots)
private int | _find_x_scale ()
| For a xy-plot do the same for the x values, as '_find_y_scale' does for the y values!
private int | _find_y_scale ()
| find good values for the minimum and maximum y-value on the chart
private | _calcTickInterval (scalar dataset_min, scalar dataset_max, scalar flag_fixed_min, scalar flag_fixed_max, scalar minTicks, scalar maxTicks)
| Calculate the Interval between ticks in y direction.
private int | _calcXTickInterval (scalar min, scalar max, scalar minF, scalar maxF, scalar minTicks, scalar maxTicks)
| Calculate the Interval between ticks in x direction.
private int | _countTicks (scalar min, scalar max, scalar interval)
| Works out how many ticks would be displayed at that interval.
private int | _round2Tick (scalar input, scalar interval, scalar roundUP)
| Rounds up or down to the next tick of interval size.
private array | _sepFP (scalar num)
| Seperates a number into it's base 10 floating point exponent & mantisa.
private array | _find_y_range ()
| Find minimum and maximum value of y data sets.
private array | _find_x_range ()
| Find minimum and maximum value of x data sets.
private int | _plot ()
| main sub that controls all the plotting of the actual chart
private int | _draw_legend ()
| let the user know what all the pretty colors mean.
private int | _draw_bottom_legend ()
| put the legend on the bottom of the chart
private int | _draw_right_legend ()
| put the legend on the right of the chart
private int | _draw_top_legend ()
| put the legend on top of the chart
private int | _draw_left_legend ()
| put the legend on the left of the chart
private int | _draw_none_legend ()
| no legend to draw.
private int | _draw_x_label ()
| draw the label for the x-axis
private int | _draw_y_label ()
| draw the label for the y-axis
private int | _draw_ticks ()
| draw the ticks and tick labels
private int | _draw_x_number_ticks ()
| draw the ticks and tick labels
private int | _draw_x_ticks ()
| draw the x-ticks and their labels
private int | _draw_y_ticks ()
| draw the y-ticks and their labels
private int | _grey_background ()
| put a grey background on the plot of the data itself
private int | _draw_grid_lines ()
| draw grid_lines
private int | _draw_x_grid_lines ()
| draw grid_lines for x
private int | _draw_y_grid_lines ()
| draw grid_lines for y
private int | _draw_y2_grid_lines ()
| draw grid_lines for y
private int | _prepare_brush (scalar color, scalar type, scalar role)
| prepare brush
Public Attributes inherited from Chart::Base
Hash | named_colors
| RGB values of named colors.
private int | _check_data
| Check the internal data to be displayed.
private int | _draw
| Plot the chart to the gd object Calls:
private int | _set_colors
| specify my colors
private int | _color_role_to_index
| return a (list of) color index(es) corresponding to the (list of) role(s)
private int | _brushStyles_of_roles
| return a (list of) brushStyles corresponding to the (list of) role(s)
private int | _draw_title
| draw the title for the chart
private int | _default_f_tick
| default tick conversion function This function is pointed to be $self->{f_x_tick} resp.
private float | _xyRatio
| Get ratio width_x/width_y.
private float | _xPixelInReal
| Get width of one Pixel in real coordinates in x-direction.
private float | _yPixelInReal
| Get width of one Pixel in real coordinates in y-direction.

## Detailed Description

Define styles for Points and LinesPoints classes.

This class provides functions which define different brush styles to extend the previous point as the only design for Points.pm or LinesPoints.pm
The different brush styles are:

See Also
  OpenCircle
  FilledCircle
  Star
  OpenDiamond
  FilledDiamond
  OpenRectangle
  FilledRectangle

## Member Data Documentation

Chart::BrushStyles::FilledCircle

Set the gdBrush object to have nice brushed object representing a point of the size $radius.

Parameters

  [in] |  | *GD::Image | $rbrush Reference to GD::Image
  [in] | int | $radius | Radius of the point in pixels
  [in] | int | $color | Color of the filled point

Returns
  nothing

Called by
use Chart::BrushStyles;
@Chart::Points::ISA = qw(Chart::BrushStyles);
$self->FilledCircle(\$rbrush,$radius, $color);
to plot the GD::Image representing a filled circle as the point

Chart::BrushStyles::FilledDiamond

Set the gdBrush object to have nice brushed object representing a filled diamond of the size $radius.

Parameters

  [in] |  | *GD::Image | $rbrush Reference to GD::Image
  [in] | int | $radius | Radius of the diamond in pixels
  [in] | int | $color | Color of the filled diamond

Returns
  nothing

Called by
use Chart::BrushStyles;
@Chart::Points::ISA = qw(Chart::BrushStyles);
$self->FilledDiamond(\$rbrush,$radius, $color);
to get back an GD::Image representing a filled diamond as the point

Chart::BrushStyles::OpenCircle

Set the gdBrush object to have nice brushed object representing a circle of the size $radius.

Parameters

  [in] |  | *GD::Image | $rbrush Reference to GD::Image
  [in] | int | $radius | Radius of the point in pixels
  [in] | int | $color | Color of the not filled point

Called by
use Chart::BrushStyles;
@Chart::Points::ISA = qw(Chart::BrushStyles);
$self->OpenCircle(\$rbrush,$radius, $newcolor);
to plot the GD::Image representing an open circle as the point

Chart::BrushStyles::OpenDiamond

Set the gdBrush object to have nice brushed object representing a diamond of the size $radius-1.

Parameters

  [in] |  | *GD::Image | $rbrush Reference to GD::Image
  [in] | int | $radius | Radius of the diamond in pixels
  [in] | int | $color | Color of the diamond

Returns
  nothing

Called by
use Chart::BrushStyles;
@Chart::Points::ISA = qw(Chart::BrushStyles);
$self->OpenDiamond(\$rbrush,$radius, $color);
to get back an GD::Image representing a diamond as the point

Chart::BrushStyles::OpenRectangle

Set the gdBrush object to have nice brushed object representing a rectangle of the height $radius-1 and width of $radius/2.

Parameters

  [in] |  | *GD::Image | $rbrush Reference to GD::Image
  [in] | int | $radius | Radius of the rectangle in pixels
  [in] | int | $color | Color of the rectangle

Returns
  nothing

Called by
use Chart::BrushStyles;
@Chart::Points::ISA = qw(Chart::BrushStyles);
$self->OpenDiamond(\$rbrush,$radius, $color);
to get back an GD::Image representing a rectangle as the point

Chart::BrushStyles::Star

Set the gdBrush object to have nice brushed object representing a star of the size $radius.

Parameters

  [in] |  | *GD::Image | $rbrush Reference to GD::Image
  [in] | int | $radius | Radius of the star in pixels
  [in] | int | $color | Color of the star

Returns
  nothing

Called by
use Chart::BrushStyles;
@Chart::Points::ISA = qw(Chart::BrushStyles);
$self->Star(\$rbrush,$radius, $color);
to get back an GD::Image representing a star as the point

The documentation for this class was generated from the following file:

- Chart/BrushStyles.pm