diff options
Diffstat (limited to 'GdiTest/LineToDrawingArea.cs')
-rw-r--r-- | GdiTest/LineToDrawingArea.cs | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/GdiTest/LineToDrawingArea.cs b/GdiTest/LineToDrawingArea.cs index 0144258..1e78aff 100644 --- a/GdiTest/LineToDrawingArea.cs +++ b/GdiTest/LineToDrawingArea.cs @@ -15,6 +15,7 @@ namespace GdiTest } private bool rendered; + private String dumpText; public LineToDrawingArea() { @@ -174,6 +175,9 @@ namespace GdiTest } } } + + dumpText = this.dump(); + return true; } @@ -182,7 +186,7 @@ namespace GdiTest String text = ""; Win32GDI GDI_Win32 = Win32GDI.getInstance(); - + if (GDI_Win32.isAvailable()) { System.Drawing.Graphics wg = Gtk.DotNet.Graphics.FromDrawable(this.GdkWindow, true); @@ -192,8 +196,12 @@ namespace GdiTest { for (int x = 0; x < 16; x++) { - System.Drawing.Color color = GDI_Win32.GetPixelColor(x, y); - text += String.Format("0x{0:X}, ", color.ToArgb()); + System.Drawing.Color color = GDI_Win32.GetPixelColor(hdc, x, y); + + if (color.R == 255) + text += "0xFF, "; + else + text += "0x00, "; } text += "\n"; } @@ -201,6 +209,11 @@ namespace GdiTest return text; } + + public override String getDumpText() + { + return dumpText; + } } } |