From 30cd4c00be0015e90089de731e376c973cf0f93e Mon Sep 17 00:00:00 2001 From: Artem Proskurnev Date: Fri, 2 Apr 2021 14:55:29 +0300 Subject: [PATCH] Fix take color --- qtsgraph.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qtsgraph.cpp b/qtsgraph.cpp index d34e35b..b580aa3 100644 --- a/qtsgraph.cpp +++ b/qtsgraph.cpp @@ -191,7 +191,7 @@ TPixel QTSGraph::ReadMousePosition() TPixel t; t.x = MouseMovePosition.x(); t.y = MouseMovePosition.y(); - t.color = GetPixel(t.x, t.y); + t.color = Canvas.toImage().pixelColor(t.x, t.y).rgba() % 0x1000000; if(SwapYAxis) t.y = Canvas.height() - t.y - 1; if(MoveOtoCenter) { @@ -206,7 +206,7 @@ TPixel QTSGraph::GetLastMouseClickPosition() TPixel t; t.x = LastMouseClickPosition.x(); t.y = LastMouseClickPosition.y(); - t.color = GetPixel(t.x, t.y); + t.color = Canvas.toImage().pixelColor(t.x, t.y).rgba() % 0x1000000; if(SwapYAxis) t.y = Canvas.height() - t.y - 1; if(MoveOtoCenter) {