Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

TGraphData Class Reference

The class containing xy-data for graph drawing. More...

#include <TGraph.h>

List of all members.

Public Member Functions

 TGraphData (TGraphDisplay *d=NULL)
 Constructor.
void Add (float x, float y)
 Add a XY pair.
void SetScales (TGraphScale *_sx, TGraphScale *_sy)
 Assign scales to this gprah.
void AutoScale ()
 Size scales to (at least) fit the data in this graph.
unsigned long GetCount ()
 Returns the number of XY pairs.
int Distance (const wxPoint &pt)
 Returns the minimum distance of the given point to the graph curve.
void drawit (wxDC &dc)
 Draws the graph in the given drawing context.
void DrawSymbol (wxDC &dc, wxString symbol, int x, int y, int size=4)
 Draws a point symbol (if any).

Public Attributes

wxString name
 Name of the graph.
wxString pointStyle
 Style of the point (used in DrawSymbol).
floatArray dx
floatArray dy
TGraphDisplaydisplay
TGraphScalesx
TGraphScalesy
wxColour col
 The color of this graph.
vector< wxPoint > drawn
 Cache of last drawn points in pixels.
bool selected
 Is this graph selected (by mouse)?


Detailed Description

The class containing xy-data for graph drawing.


Constructor & Destructor Documentation

TGraphData::TGraphData TGraphDisplay d = NULL  ) 
 

Constructor.


Member Function Documentation

void TGraphData::Add float  x,
float  y
 

Add a XY pair.

void TGraphData::AutoScale  ) 
 

Size scales to (at least) fit the data in this graph.

int TGraphData::Distance const wxPoint &  pt  ) 
 

Returns the minimum distance of the given point to the graph curve.

void TGraphData::drawit wxDC &  dc  ) 
 

Draws the graph in the given drawing context.

void TGraphData::DrawSymbol wxDC &  dc,
wxString  symbol,
int  x,
int  y,
int  size = 4
 

Draws a point symbol (if any).

unsigned long TGraphData::GetCount  ) 
 

Returns the number of XY pairs.

void TGraphData::SetScales TGraphScale _sx,
TGraphScale _sy
 

Assign scales to this gprah.


Member Data Documentation

wxColour TGraphData::col
 

The color of this graph.

TGraphDisplay* TGraphData::display
 

vector<wxPoint> TGraphData::drawn
 

Cache of last drawn points in pixels.

floatArray TGraphData::dx
 

floatArray TGraphData::dy
 

wxString TGraphData::name
 

Name of the graph.

wxString TGraphData::pointStyle
 

Style of the point (used in DrawSymbol).

bool TGraphData::selected
 

Is this graph selected (by mouse)?

TGraphScale* TGraphData::sx
 

TGraphScale * TGraphData::sy
 


The documentation for this class was generated from the following files:
Generated on Fri Aug 11 16:19:46 2006 for GENtle by  doxygen 1.4.1