wxPlot 1.8
Real time plot library for wxWidgets
Loading...
Searching...
No Matches
line.hpp
1#pragma once
2
3#include <vector>
4#include <wx/wx.h>
5
10class Line {
11protected:
12
13 wxCoord plotEndWidth = 0;
14 wxCoord plotEndHeight = 0;
15 wxCoord plotStartWidth = 0;
16 wxCoord plotStartHeight = 0;
17
18 double minX = 0;
19 double maxX = 0;
20 double minY = 0;
21 double maxY = 0;
22
23public:
24
32 void setLimits(const double minX, const double maxX, const double minY, const double maxY);
33
52 void setPlotStartWidth(const wxCoord plotStartWidth);
53
72 void setPlotStartHeight(const wxCoord plotStartHeight);
73
92 void setPlotEndWidth(const wxCoord plotEndWidth);
93
112 void setPlotEndHeight(const wxCoord plotEndHeight);
113
121 virtual void draw(wxDC& dc, const std::vector<double>& xData, const std::vector<double>& yData, const unsigned int colourIndex);
122};
Line class. Does the most of the things in 2D.
Definition line.hpp:10
wxCoord plotEndHeight
Location of right bottom corner in Y-axis.
Definition line.hpp:14
double minY
Minimum value of data in Y-axis.
Definition line.hpp:20
wxCoord plotStartHeight
Location of left upper corner in Y-axis.
Definition line.hpp:16
void setLimits(const double minX, const double maxX, const double minY, const double maxY)
Set minimum and maximum limits of the data.
Definition line.cpp:5
double maxX
Maximum value of data in X-axis.
Definition line.hpp:19
double maxY
Maximum value of data in Y-axis.
Definition line.hpp:21
void setPlotEndWidth(const wxCoord plotEndWidth)
Set the right upper corner in X-axis. Inside this rectangle, the plot is drawn. NOTE: This value is r...
Definition line.cpp:20
virtual void draw(wxDC &dc, const std::vector< double > &xData, const std::vector< double > &yData, const unsigned int colourIndex)
Draw the line plot inside the rectangle.
Definition line.cpp:28
void setPlotEndHeight(const wxCoord plotEndHeight)
Set the right bottom corner in Y-axis. Inside this rectangle, the plot is drawn. NOTE: This value is ...
Definition line.cpp:24
void setPlotStartHeight(const wxCoord plotStartHeight)
Set the left upper corner in Y-axis. Inside this rectangle, the plot is drawn. NOTE: This value is re...
Definition line.cpp:16
void setPlotStartWidth(const wxCoord plotStartWidth)
Set the left upper corner in X-axis. Inside this rectangle, the plot is drawn. NOTE: This value is re...
Definition line.cpp:12
wxCoord plotEndWidth
Location of right upper corner in X-axis.
Definition line.hpp:13
double minX
Minimum value of data in X-axis.
Definition line.hpp:18
wxCoord plotStartWidth
Location of left upper corner in X-axis.
Definition line.hpp:15