#include <HGraph.h>
Public Member Functions | |
int | AddLabel (const char *str, HPoint loc, HGraphPointFormat format=PointFormatCartesian, float xvector=1.0, float yvector=0.0, float zvector=0.0) |
void | AddLegend (HPoint loc, HGraphPointFormat format=PointFormatCartesian) |
int | AddLegendEntry (const char *str, const char *color, HGraphLegendEntryType ltype=LegendEntryTypeLine) |
int | AddLegendUnicodeEntry (const unsigned short *str, const char *color, HGraphLegendEntryType ltype=LegendEntryTypeLine) |
int | AddUnicodeLabel (const unsigned short *str, HPoint loc, HGraphPointFormat format=PointFormatCartesian, float xvector=1.0, float yvector=0.0, float zvector=0.0) |
void | ConvertPoints (unsigned int in_count, const HPoint *in_points, HGraphPointFormat in_system, HPoint *out_points, HGraphPointFormat out_system) |
bool | GetAutomaticUpdates () |
void | GetFrameColor (char *color) |
void | GetFramePattern (char *pattern) |
bool | GetFrameVisibility () |
float | GetFrameWeight () |
void | GetLabelContents (int label_id, char *str) |
HPoint | GetLabelLocation (int label_id) |
void | GetLabelTextAlignment (int label_id, char *alignment) |
void | GetLabelTextColor (int label_id, char *color) |
void | GetLabelTextFont (int label_id, char *font) |
void | GetLabelTextPath (int label_id, float *xvector, float *yvector, float *zvector) |
void | GetLabelUnicodeContents (int label_id, unsigned short *str) |
void | GetLegendEntry (int entry_id, char *str, char *color, HGraphLegendEntryType *entry_type=0) |
HPoint | GetLegendLocation () |
void | GetLegendTextFont (char *font) |
void | GetLegendTitle (char *title) |
void | GetLegendTitleTextFont (char *font) |
void | GetLegendUnicodeEntry (int entry_id, unsigned short *str, char *color, HGraphLegendEntryType *entry_type=0) |
void | GetLegendUnicodeTitle (unsigned short *title) |
HPoint | GetPlotOrigin () |
void | GetPlotTitle (char *title) |
virtual void | GetPlotTitleColor (char *color) |
HPoint | GetPlotTitleLocation () |
void | GetPlotTitleTextFont (char *font) |
void | GetPlotUnicodeTitle (unsigned short *title) |
HBaseGraph (HC_KEY plot_seg) | |
void | PreserveData (bool preserve=true) |
void | RemoveLabel (int label_id) |
void | RemoveLegend () |
void | RemoveLegendEntry (int entry_id) |
void | RemoveLegendTitle () |
void | SetAutomaticUpdates (bool automatic=true) |
void | SetFrameColor (const char *color) |
void | SetFramePattern (const char *pattern) |
void | SetFrameVisibility (bool visible) |
void | SetFrameWeight (float weight) |
void | SetLabelContents (int label_id, const char *str) |
void | SetLabelLocation (int label_id, HPoint loc, HGraphPointFormat format=PointFormatCartesian) |
void | SetLabelTextAlignment (int label_id, const char *alignment) |
void | SetLabelTextColor (int label_id, const char *color) |
void | SetLabelTextFont (int label_id, const char *font) |
void | SetLabelTextPath (int label_id, float xvector, float yvector, float zvector) |
void | SetLabelUnicodeContents (int label_id, const unsigned short *str) |
void | SetLegendLocation (HPoint loc, HGraphPointFormat format=PointFormatCartesian) |
void | SetLegendTextFont (const char *font) |
void | SetLegendTitle (const char *title) |
void | SetLegendTitleTextFont (const char *font) |
void | SetLegendUnicodeTitle (const unsigned short *title) |
void | SetPlotOrigin (HPoint origin) |
virtual void | SetPlotTitle (const char *title)=0 |
virtual void | SetPlotTitleColor (const char *color) |
void | SetPlotTitleLocation (HPoint loc) |
void | SetPlotTitleTextFont (const char *font) |
virtual void | SetPlotUnicodeTitle (unsigned short *title)=0 |
virtual void | Update () |
virtual | ~HBaseGraph () |
Protected Member Functions | |
virtual void | DrawFrame ()=0 |
virtual void | DrawLegend () |
Protected Attributes | |
bool | m_automatic_updates |
bool | m_force_update |
VArray< HGraphLabelNode * > | m_labels |
HGraphLegend | m_legend |
HPoint | m_origin |
HC_KEY | m_plot_segment |
bool | m_preserve_data |
bool | m_show_frame |
Provides basic graphing capabilities required by all types of graphs
HBaseGraph::HBaseGraph | ( | HC_KEY | plot_seg | ) |
HBaseGraph Constructor.
plot_seg | The segment that all graph subsegments will be created beneath. |
|
virtual |
~HBaseGraph Destructor.
int HBaseGraph::AddLabel | ( | const char * | str, |
HPoint | loc, | ||
HGraphPointFormat | format = PointFormatCartesian , |
||
float | xvector = 1.0 , |
||
float | yvector = 0.0 , |
||
float | zvector = 0.0 |
||
) |
Adds a label on the graph, returns the ID of the label.
str | The contents of the label. |
loc | The location on the graph to put the label. |
format | The format of the point loc. Default value: PointFormatCartesian. |
xvector | The x component of the vector that the label text will be aligned with. Default value: (1.0, 0.0, 0.0). |
yvector | The y component of the vector that the label text will be aligned with. Default value: (1.0, 0.0, 0.0). |
zvector | The z component of the vector that the label text will be aligned with. Default value: (1.0, 0.0, 0.0). |
void HBaseGraph::AddLegend | ( | HPoint | loc, |
HGraphPointFormat | format = PointFormatCartesian |
||
) |
Adds a legend to the current plot. Each plot may only have one legend.
loc | The location of the top left corner of the legend. |
format | The format of the point loc. Default value: PointFormatCartesian. |
int HBaseGraph::AddLegendEntry | ( | const char * | str, |
const char * | color, | ||
HGraphLegendEntryType | ltype = LegendEntryTypeLine |
||
) |
Adds an entry to the legend associated with a color.
str | The string to be entered in to the legend. |
color | The color associated with the string. |
ltype | What sort of geometry should be drawn in the legend entry. |
int HBaseGraph::AddLegendUnicodeEntry | ( | const unsigned short * | str, |
const char * | color, | ||
HGraphLegendEntryType | ltype = LegendEntryTypeLine |
||
) |
Adds a unicode legend entry associated with a color.
str | The string to be entered in to the legend. |
color | The color associated with the string. |
ltype | What sort of geometry should be drawn in the legend entry. |
int HBaseGraph::AddUnicodeLabel | ( | const unsigned short * | str, |
HPoint | loc, | ||
HGraphPointFormat | format = PointFormatCartesian , |
||
float | xvector = 1.0 , |
||
float | yvector = 0.0 , |
||
float | zvector = 0.0 |
||
) |
Adds a unicode label on the graph and returns the ID of the label.
str | The contents of the label. |
loc | The location on the graph to put the label. |
format | The format of the point loc. Default value: PointFormatCartesian. |
xvector | The x component of the vector that the label text will be aligned with. Default value: (1.0, 0.0, 0.0). |
yvector | The y component of the vector that the label text will be aligned with. Default value: (1.0, 0.0, 0.0). |
zvector | The z component of the vector that the label text will be aligned with. Default value: (1.0, 0.0, 0.0). |
void HBaseGraph::ConvertPoints | ( | unsigned int | in_count, |
const HPoint * | in_points, | ||
HGraphPointFormat | in_system, | ||
HPoint * | out_points, | ||
HGraphPointFormat | out_system | ||
) |
Converts in_points from one system to another. It does not actually modify in_points, but returns the transformed points as out_points. For in place conversion, out_points can be the same as in_points.
in_count | The size of the in_points array. |
in_points | An array of points to be transformed. Passed by reference always. |
in_system | The point system that in_points is in. |
out_points | An array of points the same size as in_points to hold the transformed values. Returned to user. Passed by reference always. |
out_system | The point system that in_points should be transformed into. |
|
protectedpure virtual |
|
protectedvirtual |
Constructs the legend in the Hoops segment tree.
bool HBaseGraph::GetAutomaticUpdates | ( | ) |
Gets the status of automatic updates.
void HBaseGraph::GetFrameColor | ( | char * | color | ) |
This method retrieves the current frame color.
color | The frame color. Returned to user. Passed by reference always. |
void HBaseGraph::GetFramePattern | ( | char * | pattern | ) |
This method retrieves the current frame line pattern.
pattern | The line pattern. Returned to user. Passed by reference always. |
bool HBaseGraph::GetFrameVisibility | ( | ) |
This method retrieves the visibility of the plot frame.
float HBaseGraph::GetFrameWeight | ( | ) |
This method retrieves the line weight of the current plot frame.
void HBaseGraph::GetLabelContents | ( | int | label_id, |
char * | str | ||
) |
Shows the contents of a label.
label_id | The ID of the label. |
str | The label string. Returned to user. Passed by reference always. |
HPoint HBaseGraph::GetLabelLocation | ( | int | label_id | ) |
Retrieves the location of a label.
label_id | The ID of the label. |
void HBaseGraph::GetLabelTextAlignment | ( | int | label_id, |
char * | alignment | ||
) |
Retrieves the text alignment of a label.
label_id | The ID of the label. |
alignment | The label alignment. Returned to user. Passed by reference always. |
void HBaseGraph::GetLabelTextColor | ( | int | label_id, |
char * | color | ||
) |
Retrieves the text color of a label.
label_id | The ID of the label. |
color | The label color. Returned to user. Passed by reference always. |
void HBaseGraph::GetLabelTextFont | ( | int | label_id, |
char * | font | ||
) |
Retrieves the text font of a label.
label_id | The ID of the label. |
font | The label font. Returned to user. Passed by reference always. |
void HBaseGraph::GetLabelTextPath | ( | int | label_id, |
float * | xvector, | ||
float * | yvector, | ||
float * | zvector | ||
) |
Gets the text path used for a label
label_id | The ID of the label. |
xvector | The x component of the text path vector. Returned to user. |
yvector | The y component of the text path vector. Returned to user. |
zvector | The z component of the text path vector. Returned to user. |
void HBaseGraph::GetLabelUnicodeContents | ( | int | label_id, |
unsigned short * | str | ||
) |
Shows the contents of a unicode label.
label_id | The ID of the label. |
str | The label string. Returned to user. Passed by reference always. |
void HBaseGraph::GetLegendEntry | ( | int | entry_id, |
char * | str, | ||
char * | color, | ||
HGraphLegendEntryType * | entry_type = 0 |
||
) |
Retrieves the legend entry associated with entry_id.
entry_id | The legend entry. |
str | The text string associated with the legend entry. |
color | The color of the geometry associated with the legend entry. |
entry_type | Optionally, the type of geometry drawn in the legend entry can be retrieved. Returned to user. Passed by reference always. |
HPoint HBaseGraph::GetLegendLocation | ( | ) |
Gets the location of the legend.
void HBaseGraph::GetLegendTextFont | ( | char * | font | ) |
Sets the text font of the legend entries. Note that oru font sizes should be used.
font | The font of the legend entries. Returned to user. Passed by reference always. |
void HBaseGraph::GetLegendTitle | ( | char * | title | ) |
Retrieves the title of the legend.
title | The title of the plot. Returned to user. Passed by reference always. |
void HBaseGraph::GetLegendTitleTextFont | ( | char * | font | ) |
Retrieves the text font of the legend title.
font | The font of the legend title. Returned to user. Passed by reference always. |
void HBaseGraph::GetLegendUnicodeEntry | ( | int | entry_id, |
unsigned short * | str, | ||
char * | color, | ||
HGraphLegendEntryType * | entry_type = 0 |
||
) |
Gets the unicode legend entry specified by the entry_id.
entry_id | The legend entry. |
str | The unicode string associated with the legend entry. |
color | The color of the geometry associated with the legend entry. |
entry_type | Optionally, the type of geometry drawn in the legend entry can be retrieved. Returned to user. Passed by reference always. |
void HBaseGraph::GetLegendUnicodeTitle | ( | unsigned short * | title | ) |
Gets the unicode legend title.
title | The title of the plot. Returned to user. Passed by reference always. |
HPoint HBaseGraph::GetPlotOrigin | ( | ) |
This method retrieves the location of the current plot origin.
void HBaseGraph::GetPlotTitle | ( | char * | title | ) |
This method retrieves the title of the plot.
title | The title of the plot. Returned to user. Passed by reference always. |
|
virtual |
This method retrieves the color of the title of the plot.
color | The color of the title of the plot. Passed by reference always. |
HPoint HBaseGraph::GetPlotTitleLocation | ( | ) |
Retrieves the location of the current plot title.
void HBaseGraph::GetPlotTitleTextFont | ( | char * | font | ) |
Retrieves the current font used to render the plot title.
font | The font of the plot title. Returned to user. Passed by reference always. |
void HBaseGraph::GetPlotUnicodeTitle | ( | unsigned short * | title | ) |
This method retrieves the title of the plot.
title | The title of the plot. Returned to user. Passed by reference always. |
void HBaseGraph::PreserveData | ( | bool | preserve = true | ) |
If preserve is true, the plot_seg passed into the constructor will be preserved when the plot object is destroyed. Otherwise the segment and all child segments will be deleted.
preserve | Set this parameter to true if you wish to presevere the plog segment. |
void HBaseGraph::RemoveLabel | ( | int | label_id | ) |
Removes a previously created label.
label_id | The ID of the label to be removed. |
void HBaseGraph::RemoveLegend | ( | ) |
Removes the current legend (if any) from the plot and deletes all legend entries.
void HBaseGraph::RemoveLegendEntry | ( | int | entry_id | ) |
Removes the legend entry associated with entry_id.
entry_id | The legend entry to be removed. |
void HBaseGraph::RemoveLegendTitle | ( | ) |
Removes the title of the legend. This method has no effect if the title is uninitialized.
void HBaseGraph::SetAutomaticUpdates | ( | bool | automatic = true | ) |
If automatic updates are enabled, each call that modifies the graph will immediately modify the underlying segment tree. If not, updates must be triggered manually by the user via the Update() call. By default, automatic updates are on.
automatic | If true, automatic updates will be enabled. |
void HBaseGraph::SetFrameColor | ( | const char * | color | ) |
This method sets the frame color.
color | The frame color. Passed by reference always. |
void HBaseGraph::SetFramePattern | ( | const char * | pattern | ) |
Sets the frame line pattern.
pattern | The line pattern. Passed by reference always. |
void HBaseGraph::SetFrameVisibility | ( | bool | visible | ) |
This method sets the visibility of the plot frame.
visible | A boolean value setting the current visibility of the plot's frame |
void HBaseGraph::SetFrameWeight | ( | float | weight | ) |
Sets the line weight of the plot frame.
weight | The new frame weight to be set. |
void HBaseGraph::SetLabelContents | ( | int | label_id, |
const char * | str | ||
) |
Replaces the contents of a label.
label_id | The ID of the label. |
str | The label string. Passed by reference always. |
void HBaseGraph::SetLabelLocation | ( | int | label_id, |
HPoint | loc, | ||
HGraphPointFormat | format = PointFormatCartesian |
||
) |
Sets the location of a label.
label_id | The ID of the label. |
loc | The label location. |
format | The format of the point loc. Default value: PointFormatCartesian. |
void HBaseGraph::SetLabelTextAlignment | ( | int | label_id, |
const char * | alignment | ||
) |
Sets the text alignment of a label.
label_id | The ID of the label. |
alignment | The label alignment. Passed by reference always. |
void HBaseGraph::SetLabelTextColor | ( | int | label_id, |
const char * | color | ||
) |
Sets the text color of a label.
label_id | The ID of the label. |
color | The label color. Passed by reference always. |
void HBaseGraph::SetLabelTextFont | ( | int | label_id, |
const char * | font | ||
) |
Sets the text font of a label.
label_id | The ID of the label. |
font | The label font. Passed by reference always. |
void HBaseGraph::SetLabelTextPath | ( | int | label_id, |
float | xvector, | ||
float | yvector, | ||
float | zvector | ||
) |
Sets the text path used for a label.
label_id | The ID of the label. |
xvector | The x component of the text path vector. |
yvector | The y component of the text path vector. |
zvector | The z component of the text path vector. |
void HBaseGraph::SetLabelUnicodeContents | ( | int | label_id, |
const unsigned short * | str | ||
) |
Replaces the contents of a unicode label.
label_id | The ID of the label. |
str | The label string. Passed by reference always. |
void HBaseGraph::SetLegendLocation | ( | HPoint | loc, |
HGraphPointFormat | format = PointFormatCartesian |
||
) |
Sets the location of the legend.
loc | The label location. |
format | The format of the point loc. Default value: PointFormatCartesian. |
void HBaseGraph::SetLegendTextFont | ( | const char * | font | ) |
Sets the text font of the legend entries. Note that oru font sizes should be used.
font | The font of the legend entries. Passed by reference always. |
void HBaseGraph::SetLegendTitle | ( | const char * | title | ) |
Sets the title of the legend.
title | The title of the plot. Passed by reference always. |
void HBaseGraph::SetLegendTitleTextFont | ( | const char * | font | ) |
Sets the text font of the legend title. Note that oru font sizes should be used.
font | The font of the legend title. Passed by reference always. |
void HBaseGraph::SetLegendUnicodeTitle | ( | const unsigned short * | title | ) |
Sets a unicode title for the legend.
title | The title of the plot. Passed by reference always. |
void HBaseGraph::SetPlotOrigin | ( | HPoint | origin | ) |
This method sets the location of the plot origin.
origin | An HPoint value representing the new location of the title of the plot. |
|
pure virtual |
|
virtual |
This method sets a plot title color.
color | The color of the title of the plot. |
void HBaseGraph::SetPlotTitleLocation | ( | HPoint | loc | ) |
Sets the location of the plot title.
loc | An HPoint value representing the new location of the title of the plot. |
void HBaseGraph::SetPlotTitleTextFont | ( | const char * | font | ) |
Retrieves the current font used to render the plot title.
font | The font of the plot title. Passed by reference always. |
|
pure virtual |
|
virtual |