Hugin trunk 0.1
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
wxGraphTools::Graph Class Reference

help class to draw charts More...

#include <GraphTools.h>

Public Member Functions

 Graph (int graphWidth, int graphHeight, wxColour backgroundColour)
 constructors, set size and background colour of resulting bitmap
 
 ~Graph ()
 destructor
 
void SetChartArea (int left, int top, int right, int bottom)
 set where to draw the chart on the bitmap
 
void SetChartDisplay (double xmin, double ymin, double xmax, double ymax)
 set the real dimension of the chart
 
void DrawGrid (size_t linesX, size_t linesY)
 draws the grid with linesX lines in x-direction and linexY lines in y-direction
 
void DrawLine (std::vector< hugin_utils::FDiff2D > points, wxColour colour, int penWidth=1)
 draws a line with the coordinates given in points
 
const wxBitmap GetGraph () const
 

Private Member Functions

 Graph (const Graph &)
 
Graphoperator= (const Graph &)
 
int TransformX (double x)
 
int TransformY (double y)
 

Private Attributes

double m_xmin
 
double m_xmax
 
double m_ymin
 
double m_ymax
 
int m_width
 
int m_height
 
int m_left
 
int m_top
 
int m_right
 
int m_bottom
 
wxBitmapm_bitmap
 
wxMemoryDC m_dc
 

Detailed Description

help class to draw charts

Definition at line 51 of file GraphTools.h.

Constructor & Destructor Documentation

◆ Graph() [1/2]

wxGraphTools::Graph::Graph ( int  graphWidth,
int  graphHeight,
wxColour  backgroundColour 
)

constructors, set size and background colour of resulting bitmap

Definition at line 100 of file GraphTools.cpp.

References m_bitmap, m_dc, m_height, m_width, SetChartArea(), SetChartDisplay(), and threshold().

◆ ~Graph()

wxGraphTools::Graph::~Graph ( )

destructor

Definition at line 118 of file GraphTools.cpp.

References m_dc, and threshold().

◆ Graph() [2/2]

wxGraphTools::Graph::Graph ( const Graph )
private

Member Function Documentation

◆ DrawGrid()

void wxGraphTools::Graph::DrawGrid ( size_t  linesX,
size_t  linesY 
)

draws the grid with linesX lines in x-direction and linexY lines in y-direction

Definition at line 144 of file GraphTools.cpp.

References m_bottom, m_dc, m_left, m_right, m_top, m_xmax, m_xmin, m_ymax, m_ymin, threshold(), TransformX(), and TransformY().

◆ DrawLine()

void wxGraphTools::Graph::DrawLine ( std::vector< hugin_utils::FDiff2D points,
wxColour  colour,
int  penWidth = 1 
)

draws a line with the coordinates given in points

Definition at line 160 of file GraphTools.cpp.

References m_dc, threshold(), TransformX(), and TransformY().

◆ GetGraph()

const wxBitmap wxGraphTools::Graph::GetGraph ( ) const

Definition at line 177 of file GraphTools.cpp.

References m_bitmap.

◆ operator=()

Graph & wxGraphTools::Graph::operator= ( const Graph )
private

◆ SetChartArea()

void wxGraphTools::Graph::SetChartArea ( int  left,
int  top,
int  right,
int  bottom 
)

set where to draw the chart on the bitmap

Definition at line 124 of file GraphTools.cpp.

References m_bottom, m_dc, m_left, m_right, and m_top.

Referenced by Graph().

◆ SetChartDisplay()

void wxGraphTools::Graph::SetChartDisplay ( double  xmin,
double  ymin,
double  xmax,
double  ymax 
)

set the real dimension of the chart

Definition at line 135 of file GraphTools.cpp.

References m_xmax, m_xmin, m_ymax, m_ymin, and threshold().

Referenced by Graph().

◆ TransformX()

int wxGraphTools::Graph::TransformX ( double  x)
private

Definition at line 182 of file GraphTools.cpp.

References m_left, m_right, m_xmax, m_xmin, and hugin_utils::round().

Referenced by DrawGrid(), and DrawLine().

◆ TransformY()

int wxGraphTools::Graph::TransformY ( double  y)
private

Definition at line 187 of file GraphTools.cpp.

References m_bottom, m_top, m_ymax, m_ymin, and hugin_utils::round().

Referenced by DrawGrid(), and DrawLine().

Member Data Documentation

◆ m_bitmap

wxBitmap* wxGraphTools::Graph::m_bitmap
private

Definition at line 81 of file GraphTools.h.

Referenced by GetGraph(), and Graph().

◆ m_bottom

int wxGraphTools::Graph::m_bottom
private

Definition at line 79 of file GraphTools.h.

Referenced by DrawGrid(), SetChartArea(), and TransformY().

◆ m_dc

wxMemoryDC wxGraphTools::Graph::m_dc
private

Definition at line 82 of file GraphTools.h.

Referenced by DrawGrid(), DrawLine(), Graph(), SetChartArea(), and ~Graph().

◆ m_height

int wxGraphTools::Graph::m_height
private

Definition at line 77 of file GraphTools.h.

Referenced by Graph().

◆ m_left

int wxGraphTools::Graph::m_left
private

Definition at line 79 of file GraphTools.h.

Referenced by DrawGrid(), SetChartArea(), and TransformX().

◆ m_right

int wxGraphTools::Graph::m_right
private

Definition at line 79 of file GraphTools.h.

Referenced by DrawGrid(), SetChartArea(), and TransformX().

◆ m_top

int wxGraphTools::Graph::m_top
private

Definition at line 79 of file GraphTools.h.

Referenced by DrawGrid(), SetChartArea(), and TransformY().

◆ m_width

int wxGraphTools::Graph::m_width
private

Definition at line 77 of file GraphTools.h.

Referenced by Graph().

◆ m_xmax

double wxGraphTools::Graph::m_xmax
private

Definition at line 75 of file GraphTools.h.

Referenced by DrawGrid(), SetChartDisplay(), and TransformX().

◆ m_xmin

double wxGraphTools::Graph::m_xmin
private

Definition at line 75 of file GraphTools.h.

Referenced by DrawGrid(), SetChartDisplay(), and TransformX().

◆ m_ymax

double wxGraphTools::Graph::m_ymax
private

Definition at line 75 of file GraphTools.h.

Referenced by DrawGrid(), SetChartDisplay(), and TransformY().

◆ m_ymin

double wxGraphTools::Graph::m_ymin
private

Definition at line 75 of file GraphTools.h.

Referenced by DrawGrid(), SetChartDisplay(), and TransformY().


The documentation for this class was generated from the following files: