summaryrefslogtreecommitdiff
path: root/wx+/graph.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2018-05-09 00:09:55 +0200
committerDaniel Wilhelm <shieldwed@outlook.com>2018-05-09 00:09:55 +0200
commit9b623ea3943165fe7efb5e47a0b5b9452c1599e6 (patch)
treedde40e07e907ac6e0ca9ea32524f2cd4810d4be6 /wx+/graph.cpp
parent9.7 (diff)
downloadFreeFileSync-9b623ea3943165fe7efb5e47a0b5b9452c1599e6.tar.gz
FreeFileSync-9b623ea3943165fe7efb5e47a0b5b9452c1599e6.tar.bz2
FreeFileSync-9b623ea3943165fe7efb5e47a0b5b9452c1599e6.zip
9.8
Diffstat (limited to 'wx+/graph.cpp')
-rwxr-xr-xwx+/graph.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/wx+/graph.cpp b/wx+/graph.cpp
index b81896b4..dbce3769 100755
--- a/wx+/graph.cpp
+++ b/wx+/graph.cpp
@@ -539,8 +539,6 @@ void Graph2D::addCurve(const std::shared_ptr<CurveData>& data, const CurveAttrib
void Graph2D::render(wxDC& dc) const
{
- using namespace numeric;
-
//set label font right at the start so that it is considered by wxDC::GetTextExtent() below!
dc.SetFont(labelFont_);
@@ -722,10 +720,10 @@ void Graph2D::render(wxDC& dc) const
const wxPoint screenCurrent = activeSel_->refCurrentPos() - graphAreaOrigin;
//normalize positions: a mouse selection is symmetric and *not* an half-open range!
- double screenFromX = clampCpy(screenStart .x, 0, graphArea.width - 1);
- double screenFromY = clampCpy(screenStart .y, 0, graphArea.height - 1);
- double screenToX = clampCpy(screenCurrent.x, 0, graphArea.width - 1);
- double screenToY = clampCpy(screenCurrent.y, 0, graphArea.height - 1);
+ double screenFromX = numeric::clampCpy(screenStart .x, 0, graphArea.width - 1);
+ double screenFromY = numeric::clampCpy(screenStart .y, 0, graphArea.height - 1);
+ double screenToX = numeric::clampCpy(screenCurrent.x, 0, graphArea.width - 1);
+ double screenToY = numeric::clampCpy(screenCurrent.y, 0, graphArea.height - 1);
widen(&screenFromX, &screenToX); //use full pixel range for selection!
widen(&screenFromY, &screenToY);
@@ -780,10 +778,10 @@ void Graph2D::render(wxDC& dc) const
shrink(&screenFromX, &screenToX);
shrink(&screenFromY, &screenToY);
- clamp(screenFromX, 0.0, graphArea.width - 1.0);
- clamp(screenFromY, 0.0, graphArea.height - 1.0);
- clamp(screenToX, 0.0, graphArea.width - 1.0);
- clamp(screenToY, 0.0, graphArea.height - 1.0);
+ numeric::clamp(screenFromX, 0.0, graphArea.width - 1.0);
+ numeric::clamp(screenFromY, 0.0, graphArea.height - 1.0);
+ numeric::clamp(screenToX, 0.0, graphArea.width - 1.0);
+ numeric::clamp(screenToY, 0.0, graphArea.height - 1.0);
const wxPoint pixelFrom = wxPoint(numeric::round(screenFromX),
numeric::round(screenFromY)) + graphAreaOrigin;
bgstack15