SYNOPSIS
#include <agar/core.h> #include <agar/gui.h>
DESCRIPTION
AG_FixedPlotter traces lines or dots over recorded integer values along a horizontal axis.
Originally designed to monitor frame rates, it can be useful for performance
monitoring in general.
Note: For general-purpose and more advanced plotting functions, M_Plotter(3) is available as part of the ag_math library.
Note: For general-purpose and more advanced plotting functions, M_Plotter(3) is available as part of the ag_math library.
INHERITANCE HIERARCHY
AG_Object(3)-> AG_Widget(3)-> AG_FixedPlotter.
INITIALIZATION
AG_FixedPlotter * AG_FixedPlotterNew (AG_Widget *parent, enum ag_fixed_plotter_type type, Uint flags)
The AG_FixedPlotterNew() function allocates, initializes, and attaches a new AG_FixedPlotter widget. The type argument is one of:
enum ag_fixed_plotter_type { AG_FIXED_PLOTTER_POINTS, /* Dots */ AG_FIXED_PLOTTER_LINES /* Lines */ } type;
Acceptable flags include:
AG_FIXED_PLOTTER_SCROLL | Always scroll to the end of the plot if it is not visible. |
AG_FIXED_PLOTTER_XAXIS | Display the X-axis line. |
AG_FIXED_PLOTTER_HFILL | Expand horizontally in parent container. |
AG_FIXED_PLOTTER_VFILL | Expand vertically in parent container. |
AG_FIXED_PLOTTER_EXPAND | Shorthand for AG_FIXED_PLOTTER_HFILL AG_FIXED_PLOTTER_VFILL|. |
PLOTTING
AG_FixedPlotterCurve * AG_FixedPlotterCurve (AG_FixedPlotter *fpl, const char *name, Uint8 r, Uint8 g, Uint8 b, Uint32 limit)
void AG_FixedPlotterDatum (AG_FixedPlotterCurve *curve, AG_FixedPlotterValue val)
The AG_FixedPlotterCurve() function creates a new curve into fpl. The r, g, b triplet composes a color to visually identify the item. limit is the maximum number of points (if 0, the maximum is implicitely INT_MAX - 1).
The AG_FixedPlotterDatum() function adds a value val to the specified curve.
EVENTS
The
AG_FixedPlotter widget does not generate any event.
STRUCTURE DATA
For the
AG_FixedPlotter object:
enum ag_fixed_plotter_type type | Drawing method, initially set by AG_FixedPlotterNew(). |
SEE ALSO
HISTORY
The
AG_FixedPlotter widget first appeared in
Agar 1.0.