diff --git a/example/main.cpp b/example/main.cpp
index d2f9dfb..bc5e742 100644
--- a/example/main.cpp
+++ b/example/main.cpp
@@ -15,6 +15,7 @@ int main(int argc, char *argv[])
*/
QTSGraph w(1024, 768);
+ w.SwapYAxis = false;
w.show();
return a.exec();
}
@@ -62,7 +63,7 @@ void QTSGraph::PaintBox()
OutTextXY(20, 70, "Можно прервать, если кликнуть мышью.");
while(!MouseClicked() && x < 1024)
{
- PutPixel(x, 50, 0x555555 + x * 16, 5);
+ PutPixel(x, 50, 0x555555 + x * 9999, 5);
x += 1;
Delay(10);
}
@@ -78,11 +79,11 @@ void QTSGraph::PaintBox()
SetFillStyle(1, clBlack);
Rectangle(10, 600, 200, 700);
stringstream ss;
- ss << "#" << hex << GetPixel(100,720);
+ ss << "0x" << hex << GetPixel(100,720);
SetColor(clBlack);
OutTextXY(10, 590, ss.str());
ss.str("");
- ss << "#" << hex << GetPixel(50,650);
+ ss << "0x" << hex << GetPixel(50,650);
SetColor(clWhite);
OutTextXY(30, 620, ss.str());
ss.str("");
diff --git a/qtsgraph.cpp b/qtsgraph.cpp
index d215318..ee1631a 100644
--- a/qtsgraph.cpp
+++ b/qtsgraph.cpp
@@ -58,7 +58,7 @@ void QTSGraph::Ellipse(int x1, int y1, int x2, int y2)
QRgb QTSGraph::GetPixel(int x, int y)
{
if(SwapYAxis) y = Canvas.height() - y - 1;
- return Canvas.toImage().pixelColor(x, y).rgba();
+ return Canvas.toImage().pixelColor(x, y).rgba() % 0x1000000;
}
QTSGraph::QTSGraph(int w, int h, int x, int y, QWidget *parent)
: QMainWindow(parent)
diff --git a/qtsgraph.h b/qtsgraph.h
index d0b1148..5b02e45 100644
--- a/qtsgraph.h
+++ b/qtsgraph.h
@@ -52,14 +52,14 @@ along with Vesi. If not, see .
#include
#include
-#define clRed 0x00FF0000
-#define clGreen 0x0000FF00
-#define clBlue 0x000000FF
-#define clBlack 0x00000000
-#define clWhite 0x00FFFFFF
-#define clYellow 0x00FFFF00
-#define clMagenta 0x00FF00FF
-#define clCyan 0x0000FFFF
+#define clRed 0xFF0000
+#define clGreen 0x00FF00
+#define clBlue 0x0000FF
+#define clBlack 0x000000
+#define clWhite 0xFFFFFF
+#define clYellow 0xFFFF00
+#define clMagenta 0xFF00FF
+#define clCyan 0x00FFFF
class QTSGraph : public QMainWindow
{