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/BitBltDrawingArea.cs')
-rw-r--r--GdiTest/BitBltDrawingArea.cs48
1 files changed, 20 insertions, 28 deletions
diff --git a/GdiTest/BitBltDrawingArea.cs b/GdiTest/BitBltDrawingArea.cs
index a5e3de9..269f2f1 100644
--- a/GdiTest/BitBltDrawingArea.cs
+++ b/GdiTest/BitBltDrawingArea.cs
@@ -14,40 +14,32 @@ namespace GdiTest
protected override bool OnExposeEvent (Gdk.EventExpose args)
{
using (Context cg = Gdk.CairoHelper.Create (args.Window))
- {
- cg.Antialias = Antialias.None;
- cg.LineWidth = 4;
-
- cg.Color = new Cairo.Color(1,0,0);
- cg.MoveTo (10, 10);
- cg.LineTo (110, 10);
- cg.Stroke ();
-
- cg.Color = new Cairo.Color(0,1,0);
- cg.MoveTo (10, 10);
- cg.LineTo (10, 110);
- cg.Stroke ();
-
- cg.Color = new Cairo.Color(0,0,1);
- cg.MoveTo (10, 10);
- cg.LineTo (110, 110);
- cg.Stroke ();
-
+ {
Win32GDI GDI_Win32 = Win32GDI.getInstance();
if (GDI_Win32.isAvailable())
{
System.Drawing.Graphics wg = Gtk.DotNet.Graphics.FromDrawable(this.GdkWindow, true);
- IntPtr dc = wg.GetHdc();
+ IntPtr hdc = wg.GetHdc();
- GDI_Win32.BitBlt(dc, 70, 0, 60, 60, dc, 0, 0, GDI.SRCCOPY);
- }
-
- FreeRDPGDI GDI_FreeRDP = FreeRDPGDI.getInstance();
-
- if (GDI_FreeRDP.isAvailable())
- {
- GDI_FreeRDP.GetDC((IntPtr) null);
+ TestData data = new TestData();
+
+ for (int i = 0; i < data.bmp_SRC.GetLength(0) / 2; i++)
+ {
+ for (int j = 0; j < data.bmp_SRC.GetLength(1); j++)
+ {
+ uint p = 0;
+
+ if (data.bmp_SRC[i, j] == 0)
+ p = 0;
+ else
+ p = 0xFFFFFFFF;
+
+ GDI_Win32.SetPixel(hdc, i, j, p);
+ }
+ }
+
+ //GDI_Win32.BitBlt(dc, 70, 0, 60, 60, dc, 0, 0, GDI.SRCCOPY);
}
}
return true;