#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 |
Detailed Description
Provides basic graphing capabilities required by all types of graphs
Constructor & Destructor Documentation
◆ HBaseGraph()
HBaseGraph::HBaseGraph | ( | HC_KEY | plot_seg | ) |
HBaseGraph Constructor.
- Parameters
-
plot_seg The segment that all graph subsegments will be created beneath.
◆ ~HBaseGraph()
|
virtual |
~HBaseGraph Destructor.
Member Function Documentation
◆ AddLabel()
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.
- Parameters
-
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).
- Returns
- The ID of the label just added. This ID can be used to later modify the label.
◆ AddLegend()
void HBaseGraph::AddLegend | ( | HPoint | loc, |
HGraphPointFormat | format = PointFormatCartesian |
||
) |
Adds a legend to the current plot. Each plot may only have one legend.
- Parameters
-
loc The location of the top left corner of the legend. format The format of the point loc. Default value: PointFormatCartesian.
◆ AddLegendEntry()
int HBaseGraph::AddLegendEntry | ( | const char * | str, |
const char * | color, | ||
HGraphLegendEntryType | ltype = LegendEntryTypeLine |
||
) |
Adds an entry to the legend associated with a color.
- Parameters
-
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.
- Returns
- The ID of the legend entry. This ID can be used to later modify or remove the legend entry.
◆ AddLegendUnicodeEntry()
int HBaseGraph::AddLegendUnicodeEntry | ( | const unsigned short * | str, |
const char * | color, | ||
HGraphLegendEntryType | ltype = LegendEntryTypeLine |
||
) |
Adds a unicode legend entry associated with a color.
- Parameters
-
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.
- Returns
- The ID of the legend entry. This ID can be used to later modify or remove the legend entry.
◆ AddUnicodeLabel()
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.
- Parameters
-
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).
- Returns
- The ID of the label just added. Used to later modify the label.
◆ ConvertPoints()
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.
- Parameters
-
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.
◆ DrawFrame()
|
protectedpure virtual |
◆ DrawLegend()
|
protectedvirtual |
Constructs the legend in the Hoops segment tree.
◆ GetAutomaticUpdates()
bool HBaseGraph::GetAutomaticUpdates | ( | ) |
Gets the status of automatic updates.
- Returns
- true if automatic updates are enabled, false otherwise.
◆ GetFrameColor()
void HBaseGraph::GetFrameColor | ( | char * | color | ) |
This method retrieves the current frame color.
- Parameters
-
color The frame color. Returned to user. Passed by reference always.
◆ GetFramePattern()
void HBaseGraph::GetFramePattern | ( | char * | pattern | ) |
This method retrieves the current frame line pattern.
- Parameters
-
pattern The line pattern. Returned to user. Passed by reference always.
◆ GetFrameVisibility()
bool HBaseGraph::GetFrameVisibility | ( | ) |
This method retrieves the visibility of the plot frame.
- Returns
- A boolean value reflecting the current visibility of the plot's frame
◆ GetFrameWeight()
float HBaseGraph::GetFrameWeight | ( | ) |
This method retrieves the line weight of the current plot frame.
- Returns
- The frame weight.
◆ GetLabelContents()
void HBaseGraph::GetLabelContents | ( | int | label_id, |
char * | str | ||
) |
Shows the contents of a label.
- Parameters
-
label_id The ID of the label. str The label string. Returned to user. Passed by reference always.
◆ GetLabelLocation()
HPoint HBaseGraph::GetLabelLocation | ( | int | label_id | ) |
Retrieves the location of a label.
- Parameters
-
label_id The ID of the label.
- Returns
- The label location in cartesian space.
◆ GetLabelTextAlignment()
void HBaseGraph::GetLabelTextAlignment | ( | int | label_id, |
char * | alignment | ||
) |
Retrieves the text alignment of a label.
- Parameters
-
label_id The ID of the label. alignment The label alignment. Returned to user. Passed by reference always.
◆ GetLabelTextColor()
void HBaseGraph::GetLabelTextColor | ( | int | label_id, |
char * | color | ||
) |
Retrieves the text color of a label.
- Parameters
-
label_id The ID of the label. color The label color. Returned to user. Passed by reference always.
◆ GetLabelTextFont()
void HBaseGraph::GetLabelTextFont | ( | int | label_id, |
char * | font | ||
) |
Retrieves the text font of a label.
- Parameters
-
label_id The ID of the label. font The label font. Returned to user. Passed by reference always.
◆ GetLabelTextPath()
void HBaseGraph::GetLabelTextPath | ( | int | label_id, |
float * | xvector, | ||
float * | yvector, | ||
float * | zvector | ||
) |
Gets the text path used for a label
- Parameters
-
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.
◆ GetLabelUnicodeContents()
void HBaseGraph::GetLabelUnicodeContents | ( | int | label_id, |
unsigned short * | str | ||
) |
Shows the contents of a unicode label.
- Parameters
-
label_id The ID of the label. str The label string. Returned to user. Passed by reference always.
◆ GetLegendEntry()
void HBaseGraph::GetLegendEntry | ( | int | entry_id, |
char * | str, | ||
char * | color, | ||
HGraphLegendEntryType * | entry_type = 0 |
||
) |
Retrieves the legend entry associated with entry_id.
- Parameters
-
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.
◆ GetLegendLocation()
HPoint HBaseGraph::GetLegendLocation | ( | ) |
Gets the location of the legend.
- Returns
- The location of the legend in cartesian space.
◆ GetLegendTextFont()
void HBaseGraph::GetLegendTextFont | ( | char * | font | ) |
Sets the text font of the legend entries. Note that oru font sizes should be used.
- Parameters
-
font The font of the legend entries. Returned to user. Passed by reference always.
◆ GetLegendTitle()
void HBaseGraph::GetLegendTitle | ( | char * | title | ) |
Retrieves the title of the legend.
- Parameters
-
title The title of the plot. Returned to user. Passed by reference always.
◆ GetLegendTitleTextFont()
void HBaseGraph::GetLegendTitleTextFont | ( | char * | font | ) |
Retrieves the text font of the legend title.
- Parameters
-
font The font of the legend title. Returned to user. Passed by reference always.
◆ GetLegendUnicodeEntry()
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.
- Parameters
-
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.
◆ GetLegendUnicodeTitle()
void HBaseGraph::GetLegendUnicodeTitle | ( | unsigned short * | title | ) |
Gets the unicode legend title.
- Parameters
-
title The title of the plot. Returned to user. Passed by reference always.
◆ GetPlotOrigin()
HPoint HBaseGraph::GetPlotOrigin | ( | ) |
This method retrieves the location of the current plot origin.
- Returns
- An HPoint value representing the location of the plot's origin point.
◆ GetPlotTitle()
void HBaseGraph::GetPlotTitle | ( | char * | title | ) |
This method retrieves the title of the plot.
- Parameters
-
title The title of the plot. Returned to user. Passed by reference always.
◆ GetPlotTitleColor()
|
virtual |
This method retrieves the color of the title of the plot.
- Parameters
-
color The color of the title of the plot. Passed by reference always.
◆ GetPlotTitleLocation()
HPoint HBaseGraph::GetPlotTitleLocation | ( | ) |
Retrieves the location of the current plot title.
- Returns
- An HPoint value representing the location of the title of the plot.
◆ GetPlotTitleTextFont()
void HBaseGraph::GetPlotTitleTextFont | ( | char * | font | ) |
Retrieves the current font used to render the plot title.
- Parameters
-
font The font of the plot title. Returned to user. Passed by reference always.
◆ GetPlotUnicodeTitle()
void HBaseGraph::GetPlotUnicodeTitle | ( | unsigned short * | title | ) |
This method retrieves the title of the plot.
- Parameters
-
title The title of the plot. Returned to user. Passed by reference always.
◆ PreserveData()
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.
- Parameters
-
preserve Set this parameter to true if you wish to presevere the plog segment.
◆ RemoveLabel()
void HBaseGraph::RemoveLabel | ( | int | label_id | ) |
Removes a previously created label.
- Parameters
-
label_id The ID of the label to be removed.
◆ RemoveLegend()
void HBaseGraph::RemoveLegend | ( | ) |
Removes the current legend (if any) from the plot and deletes all legend entries.
◆ RemoveLegendEntry()
void HBaseGraph::RemoveLegendEntry | ( | int | entry_id | ) |
Removes the legend entry associated with entry_id.
- Parameters
-
entry_id The legend entry to be removed.
◆ RemoveLegendTitle()
void HBaseGraph::RemoveLegendTitle | ( | ) |
Removes the title of the legend. This method has no effect if the title is uninitialized.
◆ SetAutomaticUpdates()
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.
- Parameters
-
automatic If true, automatic updates will be enabled.
◆ SetFrameColor()
void HBaseGraph::SetFrameColor | ( | const char * | color | ) |
This method sets the frame color.
- Parameters
-
color The frame color. Passed by reference always.
◆ SetFramePattern()
void HBaseGraph::SetFramePattern | ( | const char * | pattern | ) |
Sets the frame line pattern.
- Parameters
-
pattern The line pattern. Passed by reference always.
◆ SetFrameVisibility()
void HBaseGraph::SetFrameVisibility | ( | bool | visible | ) |
This method sets the visibility of the plot frame.
- Parameters
-
visible A boolean value setting the current visibility of the plot's frame
◆ SetFrameWeight()
void HBaseGraph::SetFrameWeight | ( | float | weight | ) |
Sets the line weight of the plot frame.
- Parameters
-
weight The new frame weight to be set.
◆ SetLabelContents()
void HBaseGraph::SetLabelContents | ( | int | label_id, |
const char * | str | ||
) |
Replaces the contents of a label.
- Parameters
-
label_id The ID of the label. str The label string. Passed by reference always.
◆ SetLabelLocation()
void HBaseGraph::SetLabelLocation | ( | int | label_id, |
HPoint | loc, | ||
HGraphPointFormat | format = PointFormatCartesian |
||
) |
Sets the location of a label.
- Parameters
-
label_id The ID of the label. loc The label location. format The format of the point loc. Default value: PointFormatCartesian.
◆ SetLabelTextAlignment()
void HBaseGraph::SetLabelTextAlignment | ( | int | label_id, |
const char * | alignment | ||
) |
Sets the text alignment of a label.
- Parameters
-
label_id The ID of the label. alignment The label alignment. Passed by reference always.
◆ SetLabelTextColor()
void HBaseGraph::SetLabelTextColor | ( | int | label_id, |
const char * | color | ||
) |
Sets the text color of a label.
- Parameters
-
label_id The ID of the label. color The label color. Passed by reference always.
◆ SetLabelTextFont()
void HBaseGraph::SetLabelTextFont | ( | int | label_id, |
const char * | font | ||
) |
Sets the text font of a label.
- Parameters
-
label_id The ID of the label. font The label font. Passed by reference always.
◆ SetLabelTextPath()
void HBaseGraph::SetLabelTextPath | ( | int | label_id, |
float | xvector, | ||
float | yvector, | ||
float | zvector | ||
) |
Sets the text path used for a label.
- Parameters
-
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.
◆ SetLabelUnicodeContents()
void HBaseGraph::SetLabelUnicodeContents | ( | int | label_id, |
const unsigned short * | str | ||
) |
Replaces the contents of a unicode label.
- Parameters
-
label_id The ID of the label. str The label string. Passed by reference always.
◆ SetLegendLocation()
void HBaseGraph::SetLegendLocation | ( | HPoint | loc, |
HGraphPointFormat | format = PointFormatCartesian |
||
) |
Sets the location of the legend.
- Parameters
-
loc The label location. format The format of the point loc. Default value: PointFormatCartesian.
◆ SetLegendTextFont()
void HBaseGraph::SetLegendTextFont | ( | const char * | font | ) |
Sets the text font of the legend entries. Note that oru font sizes should be used.
- Parameters
-
font The font of the legend entries. Passed by reference always.
◆ SetLegendTitle()
void HBaseGraph::SetLegendTitle | ( | const char * | title | ) |
Sets the title of the legend.
- Parameters
-
title The title of the plot. Passed by reference always.
◆ SetLegendTitleTextFont()
void HBaseGraph::SetLegendTitleTextFont | ( | const char * | font | ) |
Sets the text font of the legend title. Note that oru font sizes should be used.
- Parameters
-
font The font of the legend title. Passed by reference always.
◆ SetLegendUnicodeTitle()
void HBaseGraph::SetLegendUnicodeTitle | ( | const unsigned short * | title | ) |
Sets a unicode title for the legend.
- Parameters
-
title The title of the plot. Passed by reference always.
◆ SetPlotOrigin()
void HBaseGraph::SetPlotOrigin | ( | HPoint | origin | ) |
This method sets the location of the plot origin.
- Parameters
-
origin An HPoint value representing the new location of the title of the plot.
◆ SetPlotTitle()
|
pure virtual |
◆ SetPlotTitleColor()
|
virtual |
This method sets a plot title color.
- Parameters
-
color The color of the title of the plot.
◆ SetPlotTitleLocation()
void HBaseGraph::SetPlotTitleLocation | ( | HPoint | loc | ) |
Sets the location of the plot title.
- Parameters
-
loc An HPoint value representing the new location of the title of the plot.
◆ SetPlotTitleTextFont()
void HBaseGraph::SetPlotTitleTextFont | ( | const char * | font | ) |
Retrieves the current font used to render the plot title.
- Parameters
-
font The font of the plot title. Passed by reference always.
◆ SetPlotUnicodeTitle()
|
pure virtual |
◆ Update()
|
virtual |
The documentation for this class was generated from the following file: