static IGeometry makeGeometry(IDrawingBackend backend)
        {
            var geometry = backend.Geometry(gt =>
            {
                gt.Line(5, 5, 75, 35);
                gt.Ellipse(25, 5, 30, 30);
            });

            return(geometry);
        }
        static IGeometry makeGeometry(IDrawingBackend backend)
        {
            var geometry = backend.Geometry(gt =>
                {
                    gt.Line(5, 5, 75, 35);
                    gt.Ellipse(25, 5, 30, 30);
                });

            return geometry;
        }
示例#3
0
 static ITestResultMethod runGeometryTargetTest(
     ITestResultFactory resultFactory,
     IDrawingBackend drawingBackend,
     object instance,
     TestMethod testMethod)
 {
     using (var geometry = drawingBackend.Geometry(target => testMethod.invoke(instance, target, drawingBackend)))
     {
         return(runMethodTest(resultFactory, drawingBackend, testMethod, dt =>
         {
             dt.Fill(color: new Color(0.7, 0.7, 1.0));
             dt.Geometry(geometry);
         }));
     }
 }
示例#4
0
 static ITestResultMethod runGeometryTargetTest(
     ITestResultFactory resultFactory,
     IDrawingBackend drawingBackend,
     object instance,
     TestMethod testMethod)
 {
     using (var geometry = drawingBackend.Geometry(target => testMethod.invoke(instance, target, drawingBackend)))
     {
         return runMethodTest(resultFactory, drawingBackend, testMethod, dt =>
             {
                 dt.Fill(color: new Color(0.7, 0.7, 1.0));
                 dt.Geometry(geometry);
             });
     }
 }
示例#5
0
		public static IGeometry Ellipse(this IDrawingBackend backend, double x, double y, double width, double height)
		{
			return backend.Geometry(gt => gt.Ellipse(x, y, width, height));
		}
示例#6
0
		public static IGeometry RoundedRectangle(this IDrawingBackend backend, double x, double y, double width, double height, double cornerRadius)
		{
			return backend.Geometry(gt => gt.RoundedRectangle(x, y, width, height, cornerRadius));
		}
示例#7
0
		public static IGeometry Polygon(this IDrawingBackend backend, params double[] coordinatePairs)
		{
			return backend.Geometry(gt => gt.Polygon(coordinatePairs));
		}
示例#8
0
		public static IGeometry Line(this IDrawingBackend backend, double x1, double y1, double x2, double y2)
		{
			return backend.Geometry(gt => gt.Line(x1, y1, x2, y2));
		}
示例#9
0
		public static IGeometry Geometry(this IDrawingBackend backend, Action<IGeometryTarget> geometryBuilder)
		{
			var recorder = new GeometryTargetRecorder();
			geometryBuilder(recorder);
			return backend.Geometry(recorder);
		}