MathPlot
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:
Collaboration graph
[legend]

Public Member Functions

 mpFloatRect (mpWindow &w)
 Constructs a new mpFloatRect using it parent mpWindow to obtain the number of Y-scales to use. More...
 
 mpFloatRect ()=delete
 Only allow constructor with mpWindow supplied.
 
bool PointIsInside (double px, double py, size_t yIndex=0) const
 Is point inside this bounding box?
 
void UpdateBoundingBoxToInclude (double px, double py, size_t yIndex=0)
 Update bounding box to include this point.
 
void InitializeBoundingBox (double px, double py, size_t yIndex=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 x
 
std::vector< mpRangey
 

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)

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

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

Parameters
wparent mpWindow from which to obtain informations