Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FreeRDP/GdiTest.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'GdiTest/TestDrawingArea.cs')
-rw-r--r--GdiTest/TestDrawingArea.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/GdiTest/TestDrawingArea.cs b/GdiTest/TestDrawingArea.cs
index f32ddd2..8b36e32 100644
--- a/GdiTest/TestDrawingArea.cs
+++ b/GdiTest/TestDrawingArea.cs
@@ -19,6 +19,33 @@ namespace GdiTest
}
abstract public String getDumpText();
+
+ public String dumpPixelArea(GDI gdi, IntPtr hdc, int X, int Y, int W, int H)
+ {
+ String text = "";
+
+ if (gdi.isAvailable())
+ {
+ text += "{\n";
+ for (int y = Y; y < Y + H; y++)
+ {
+ text += "\t\"";
+ for (int x = X; x < X + W; x++)
+ {
+ int p = gdi.GetPixel(hdc, x, y);
+
+ if (p == 0)
+ text += "\\x00";
+ else
+ text += "\\xFF";
+ }
+ text += "\"\n";
+ }
+ text += "};\n";
+ }
+
+ return text;
+ }
}
}