wxMathPlot - Plot Library for wxWidgets Applications
Public Member Functions | Public Attributes | List of all members
mpFloatRect Struct Reference

A structure for computation of bounds in real units (not in screen pixel) X refer to X axis Y refer to Y axis. More...

#include <mathplot.h>

Collaboration diagram for mpFloatRect:
[legend]

Public Member Functions

 mpFloatRect (mpWindow &w)
 Construct a new mpFloatRect using it's parent mpWindow to obtain the number of Y-scales to use.
 
 mpFloatRect ()=delete
 Only allow constructor with mpWindow supplied.
 
bool PointIsInside (double px, double py, size_t yAxisID=0) const
 Is point inside this bounding box?
 
void UpdateBoundingBoxToInclude (double px, double py, size_t yAxisID=0)
 Update bounding box to include this point.
 
void InitializeBoundingBox (double px, double py, size_t yAxisID=0)
 Initialize bounding box with an initial point.
 
bool IsNotSet (mpWindow &w) const
 Is mpFloatRect set ?
 
bool operator== (const mpFloatRect &rect) const
 Equal operator.
 

Public Attributes

mpRange< double > x
 range over x direction
 
std::vector< mpRange< double > > y
 array of range over all y directions
 

Detailed Description

A structure for computation of bounds in real units (not in screen pixel) X refer to X axis Y refer to Y axis.

Constructor & Destructor Documentation

◆ mpFloatRect()

mpFloatRect::mpFloatRect ( mpWindow w)

Construct a new mpFloatRect using it's parent mpWindow to obtain the number of Y-scales to use.

This makes sure that the y-size always matches the parent mpWindow y-size

Parameters
wparent mpWindow from which to obtain informations

Member Function Documentation

◆ InitializeBoundingBox()

void mpFloatRect::InitializeBoundingBox ( double  px,
double  py,
size_t  yAxisID = 0 
)
inline

Initialize bounding box with an initial point.

Parameters
pxx-coordinate
pyy-coordinate
yAxisIDthe y-axis ID (default 0, the first y axis)

◆ PointIsInside()

bool mpFloatRect::PointIsInside ( double  px,
double  py,
size_t  yAxisID = 0 
) const
inline

Is point inside this bounding box?

Parameters
pxx-coordinate
pyy-coordinate
yAxisIDthe y-axis ID (default 0, the first y axis)

◆ UpdateBoundingBoxToInclude()

void mpFloatRect::UpdateBoundingBoxToInclude ( double  px,
double  py,
size_t  yAxisID = 0 
)
inline

Update bounding box to include this point.

Parameters
pxx-coordinate
pyy-coordinate
yAxisIDthe y-axis ID (default 0, the first y axis)