Main Page | Modules | Data Structures | File List | Data Fields

Graph
[Trend]


Data Structures

struct  trd_graph_t
struct  trd_state_change_t

Typedefs

typedef trd_state_change_t trd_state_change_t
typedef trd_graph_t trd_graph_t

Functions

trd_graph_ttrd_graph_create (long width, long height, apr_pool_t *pool)
sos_status_t * trd_graph_status_find (trd_graph_t *graph, sul_key_t id)
void trd_graph_render_basics (trd_graph_t *graph)
void trd_graph_render_title (trd_graph_t *graph)
void trd_graph_write (trd_graph_t *graph, char *file)
long trd_graph_transform_x (trd_graph_t *graph, time_t x)
long trd_graph_transform_y (trd_graph_t *graph, float y)
void trd_graph_render_legend (trd_graph_t *graph)
void trd_graph_render_grid (trd_graph_t *graph, short x, short y)
void trd_graph_render_axii (trd_graph_t *graph)

Typedef Documentation

typedef struct trd_graph_t trd_graph_t
 

Graph object storing properties and information for a graph that the trend grapher is generating.

typedef struct trd_state_change_t trd_state_change_t
 

Object representing a state change in the history of an object.


Function Documentation

trd_graph_t* trd_graph_create long  width,
long  height,
apr_pool_t *  pool
 

Creates a new Graph object.

Parameters:
width Width of the graph's image.
height Height of the graph's image.
pool Pool to allocate memory overhead from.
Returns:
A graph object.

void trd_graph_render_axii trd_graph_t graph  ) 
 

Renders graph axii.

Parameters:
graph A graph object.

void trd_graph_render_basics trd_graph_t graph  ) 
 

Renders the basic foundation onto the graph, including the background and the lovely border we wrap everything in. Used for every type of graph that this executable can make, its pretty important cause otherwise they look kind of funny.

Parameters:
graph A graph object.

void trd_graph_render_grid trd_graph_t graph,
short  x,
short  y
 

Renders a standard grid to the graph.

Parameters:
graph A graph object.
x Flag indicating if the X axis should be done.
y Flag indicating if the Y axis should be done.

void trd_graph_render_legend trd_graph_t graph  ) 
 

Renders a legend to the graph, detailing the information that one can learn from her.

Parameters:
graph A graph object.

void trd_graph_render_title trd_graph_t graph  ) 
 

Renders the title to the graph, read in from the graph objects title member variable.

Parameters:
graph A graph object.

sos_status_t* trd_graph_status_find trd_graph_t graph,
sul_key_t  id
 

Locates a status object in the Graph with the given identifier, this avoid a query each time we need this.

Parameters:
graph A graph object.
id Identifier of the status we're looking for.
Returns:
A status object with matching ID or NULL if one was unavailable.

long trd_graph_transform_x trd_graph_t graph,
time_t  x
 

Transforms an X coordinate in standard "data" space to the plotting area space.

Parameters:
graph A graph object.
x X coordinate to transform.
Returns:
X coordinate for rendering.

long trd_graph_transform_y trd_graph_t graph,
float  y
 

Transforms an Y coordinate in standard "data" space to the plotting area space.

Parameters:
graph A graph object.
y Y coordinate to transform.
Returns:
Y coordinate for rendering.

void trd_graph_write trd_graph_t graph,
char *  file
 

Writes the graph's image to a file as a PNG image.

Parameters:
graph A graph object.
file File name to write the image to.


Generated on Wed Apr 28 09:38:38 2004 for State by doxygen 1.3.5