Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 More...
 
 ~Graph ()
 destructor More...
 
void SetChartArea (int left, int top, int right, int bottom)
 set where to draw the chart on the bitmap More...
 
void SetChartDisplay (double xmin, double ymin, double xmax, double ymax)
 set the real dimension of the chart More...
 
void DrawGrid (size_t linesX, size_t linesY)
 draws the grid with linesX lines in x-direction and linexY lines in y-direction More...
 
void DrawLine (std::vector< hugin_utils::FDiff2D > points, wxColour colour, int penWidth=1)
 draws a line with the coordinates given in points More...
 
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
 
wxBitmap * m_bitmap
 
wxMemoryDC m_dc
 

Detailed Description

help class to draw charts

Definition at line 51 of file GraphTools.h.

Constructor & Destructor Documentation

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

constructors, set size and background colour of resulting bitmap

Definition at line 101 of file GraphTools.cpp.

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

wxGraphTools::Graph::~Graph ( )

destructor

Definition at line 119 of file GraphTools.cpp.

References m_dc.

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

Member Function Documentation

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 145 of file GraphTools.cpp.

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

Referenced by wxGraphTools::GetDistortionGraph(), ImageVariableDialog::OnShowResponseGraph(), and ImageVariableDialog::OnShowVignettingGraph().

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 161 of file GraphTools.cpp.

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

Referenced by wxGraphTools::GetDistortionGraph(), ImageVariableDialog::OnShowResponseGraph(), and ImageVariableDialog::OnShowVignettingGraph().

const wxBitmap wxGraphTools::Graph::GetGraph ( ) const
Graph& wxGraphTools::Graph::operator= ( const Graph )
private
void wxGraphTools::Graph::SetChartArea ( int  left,
int  top,
int  right,
int  bottom 
)

set where to draw the chart on the bitmap

Definition at line 125 of file GraphTools.cpp.

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

Referenced by wxGraphTools::GetDistortionGraph(), Graph(), ImageVariableDialog::OnShowResponseGraph(), and ImageVariableDialog::OnShowVignettingGraph().

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

set the real dimension of the chart

Definition at line 136 of file GraphTools.cpp.

References m_xmax, m_xmin, m_ymax, and m_ymin.

Referenced by wxGraphTools::GetDistortionGraph(), Graph(), ImageVariableDialog::OnShowResponseGraph(), and ImageVariableDialog::OnShowVignettingGraph().

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

Definition at line 183 of file GraphTools.cpp.

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

Referenced by DrawGrid(), and DrawLine().

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

Definition at line 188 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

wxBitmap* wxGraphTools::Graph::m_bitmap
private

Definition at line 81 of file GraphTools.h.

Referenced by GetGraph(), and Graph().

int wxGraphTools::Graph::m_bottom
private

Definition at line 79 of file GraphTools.h.

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

wxMemoryDC wxGraphTools::Graph::m_dc
private

Definition at line 82 of file GraphTools.h.

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

int wxGraphTools::Graph::m_height
private

Definition at line 77 of file GraphTools.h.

Referenced by Graph().

int wxGraphTools::Graph::m_left
private

Definition at line 79 of file GraphTools.h.

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

int wxGraphTools::Graph::m_right
private

Definition at line 79 of file GraphTools.h.

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

int wxGraphTools::Graph::m_top
private

Definition at line 79 of file GraphTools.h.

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

int wxGraphTools::Graph::m_width
private

Definition at line 77 of file GraphTools.h.

Referenced by Graph().

double wxGraphTools::Graph::m_xmax
private

Definition at line 75 of file GraphTools.h.

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

double wxGraphTools::Graph::m_xmin
private

Definition at line 75 of file GraphTools.h.

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

double wxGraphTools::Graph::m_ymax
private

Definition at line 75 of file GraphTools.h.

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

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: