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; }
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); })); } }
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); }); } }
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)); }
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)); }
public static IGeometry Polygon(this IDrawingBackend backend, params double[] coordinatePairs) { return backend.Geometry(gt => gt.Polygon(coordinatePairs)); }
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)); }
public static IGeometry Geometry(this IDrawingBackend backend, Action<IGeometryTarget> geometryBuilder) { var recorder = new GeometryTargetRecorder(); geometryBuilder(recorder); return backend.Geometry(recorder); }