Fix take color

main
Artem Proskurnev 4 years ago
parent 1bc0825aca
commit 30cd4c00be
  1. 4
      qtsgraph.cpp

@ -191,7 +191,7 @@ TPixel QTSGraph::ReadMousePosition()
TPixel t; TPixel t;
t.x = MouseMovePosition.x(); t.x = MouseMovePosition.x();
t.y = MouseMovePosition.y(); 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(SwapYAxis) t.y = Canvas.height() - t.y - 1;
if(MoveOtoCenter) if(MoveOtoCenter)
{ {
@ -206,7 +206,7 @@ TPixel QTSGraph::GetLastMouseClickPosition()
TPixel t; TPixel t;
t.x = LastMouseClickPosition.x(); t.x = LastMouseClickPosition.x();
t.y = LastMouseClickPosition.y(); 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(SwapYAxis) t.y = Canvas.height() - t.y - 1;
if(MoveOtoCenter) if(MoveOtoCenter)
{ {

Loading…
Cancel
Save