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:
authorMarc-André Moreau <marcandre.moreau@gmail.com>2011-04-02 01:43:54 +0400
committerMarc-André Moreau <marcandre.moreau@gmail.com>2011-04-02 01:43:54 +0400
commit086be7f41cb4ce3e3d03102e807d938fe1f06156 (patch)
tree9a80e0f379a7b0f1c66ded971799efbf590687e6
parentc6b9e658f94d53c5356639c754999e11d2a2e42a (diff)
Added new Ellipse() test cases
-rw-r--r--GdiTest/EllipseDrawingArea.cs29
-rw-r--r--GdiTest/TestDrawingArea.cs8
2 files changed, 30 insertions, 7 deletions
diff --git a/GdiTest/EllipseDrawingArea.cs b/GdiTest/EllipseDrawingArea.cs
index 60ae5ac..3e75c28 100644
--- a/GdiTest/EllipseDrawingArea.cs
+++ b/GdiTest/EllipseDrawingArea.cs
@@ -26,16 +26,31 @@ namespace GdiTest
IntPtr hdc = wg.GetHdc();
int i = 0;
- int n = 1;
+ int n = 3;
int w = 16;
int h = 16;
- Area[] areas = new Area[n];
+ Rect[] rects = new Rect[n];
- areas[i].X = 0;
- areas[i].Y = 0;
- areas[i].W = w;
- areas[i].H = h;
+ /* Test Case 1 */
+ rects[i].x1 = 0;
+ rects[i].y1 = 0;
+ rects[i].x2 = w;
+ rects[i].y2 = h;
+ i++;
+
+ /* Test Case 2 */
+ rects[i].x1 = w * i + 3;
+ rects[i].y1 = 0;
+ rects[i].x2 = w * (i + 1) - 3;
+ rects[i].y2 = h;
+ i++;
+
+ /* Test Case 3 */
+ rects[i].x1 = w * i;
+ rects[i].y1 = 0 + 3;
+ rects[i].x2 = w * (i + 1);
+ rects[i].y2 = h - 3;
i++;
/* Fill Area with White */
@@ -50,7 +65,7 @@ namespace GdiTest
for (i = 0; i < n; i++)
{
- GDI_Win32.Ellipse(hdc, areas[i].X, areas[i].Y, areas[i].W, areas[i].H);
+ GDI_Win32.Ellipse(hdc, rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2);
dumpText += "unsigned char ellipse_case_" + (i + 1) + "[" + w * h + "] = \n";
dumpText += dumpPixelArea(GDI_Win32, hdc, i * w, 0, w, h) + "\n";
diff --git a/GdiTest/TestDrawingArea.cs b/GdiTest/TestDrawingArea.cs
index 8b36e32..1ab7bd3 100644
--- a/GdiTest/TestDrawingArea.cs
+++ b/GdiTest/TestDrawingArea.cs
@@ -12,6 +12,14 @@ namespace GdiTest
public int H;
}
+ public struct Rect
+ {
+ public int x1;
+ public int y1;
+ public int x2;
+ public int y2;
+ }
+
public abstract class TestDrawingArea : DrawingArea
{
public TestDrawingArea ()