public void CorrectlySetsBrushThicknessRectangleAndOptions() { img.Draw(brush, thickness, rectangle, noneDefault); Assert.NotEmpty(img.ProcessorApplications); DrawPathProcessor <Color> processor = Assert.IsType <DrawPathProcessor <Color> >(img.ProcessorApplications[0].processor); Assert.Equal(noneDefault, processor.Options); ShapePath shapepath = Assert.IsType <ShapePath>(processor.Path); Assert.NotEmpty(shapepath.Paths); SixLabors.Shapes.Rectangle rect = Assert.IsType <SixLabors.Shapes.Rectangle>(shapepath.Paths[0].AsShape()); Assert.Equal(rect.Location.X, rectangle.X); Assert.Equal(rect.Location.Y, rectangle.Y); Assert.Equal(rect.Size.Width, rectangle.Width); Assert.Equal(rect.Size.Height, rectangle.Height); Pen <Color> pen = Assert.IsType <Pen <Color> >(processor.Pen); Assert.Equal(brush, pen.Brush); Assert.Equal(thickness, pen.Width); }
public void CorrectlySetsColorThicknessAndRectangle() { img.Draw(color, thickness, rectangle); Assert.NotEmpty(img.ProcessorApplications); DrawPathProcessor <Rgba32> processor = Assert.IsType <DrawPathProcessor <Rgba32> >(img.ProcessorApplications[0].processor); Assert.Equal(GraphicsOptions.Default, processor.Options); ShapePath shapepath = Assert.IsType <ShapePath>(processor.Path); SixLabors.Shapes.Rectangle rect = Assert.IsType <SixLabors.Shapes.Rectangle>(shapepath.Path); Assert.Equal(rect.Location.X, rectangle.X); Assert.Equal(rect.Location.Y, rectangle.Y); Assert.Equal(rect.Size.Width, rectangle.Width); Assert.Equal(rect.Size.Height, rectangle.Height); Pen <Rgba32> pen = Assert.IsType <Pen <Rgba32> >(processor.Pen); Assert.Equal(thickness, pen.Width); SolidBrush <Rgba32> brush = Assert.IsType <SolidBrush <Rgba32> >(pen.Brush); Assert.Equal(color, brush.Color); }
public void Pen() { this.operations.DrawPolygon(new ShapeGraphicsOptions(), this.pen, this.points); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.NotEqual(this.shapeOptions, processor.Options.ShapeOptions); this.VerifyPoints(this.points, processor.Shape); Assert.Equal(this.pen, processor.Pen); }
public void Pen() { this.operations.DrawLines(new DrawingOptions(), this.pen, this.points); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.NotEqual(this.shapeOptions, processor.Options.ShapeOptions); this.VerifyPoints(this.points, processor.Path); Assert.Equal(this.pen, processor.Pen); }
public void CorrectlySetsPenAndPathDefaultOptions() { this.operations.Draw(this.pen, this.rectangle); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.Equal(this.shapeOptions, processor.Options.ShapeOptions); Assert.Equal(this.rectanglePolygon, processor.Shape); Assert.Equal(this.pen, processor.Pen); }
public void CorrectlySetsPenAndPath() { this.operations.Draw(new DrawingOptions(), this.pen, this.rectangle); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.NotEqual(this.shapeOptions, processor.Options.ShapeOptions); Assert.True(RectangularPolygonValueComparer.Equals(this.RectanglePolygon, processor.Path)); Assert.Equal(this.pen, processor.Pen); }
public void PenDefaultOptions() { this.operations.Draw(this.pen, this.path); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.Equal(this.shapeOptions, processor.Options.ShapeOptions); Assert.Equal(this.path, processor.Path); Assert.Equal(this.pen, processor.Pen); }
public void PenDefaultOptions() { this.operations.DrawBeziers(this.pen, this.points); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.Equal(this.shapeOptions, processor.Options.ShapeOptions); this.VerifyPoints(this.points, processor.Shape); Assert.Equal(this.pen, processor.Pen); }
public void JointAndEndCapStyleDefaultOptions() { this.operations.DrawBeziers(this.pen.StrokeFill, 10, this.points); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.Equal(this.shapeOptions, processor.Options.ShapeOptions); this.VerifyPoints(this.points, processor.Path); Assert.Equal(this.pen.JointStyle, processor.Pen.JointStyle); Assert.Equal(this.pen.EndCapStyle, processor.Pen.EndCapStyle); }
public void JointAndEndCapStyle() { this.operations.Draw(new DrawingOptions(), this.pen.StrokeFill, 10, this.path); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.NotEqual(this.shapeOptions, processor.Options.ShapeOptions); Assert.Equal(this.path, processor.Path); Assert.Equal(this.pen.JointStyle, processor.Pen.JointStyle); Assert.Equal(this.pen.EndCapStyle, processor.Pen.EndCapStyle); }
public void BrushAndThickness() { this.operations.DrawPolygon(new ShapeGraphicsOptions(), this.pen.StrokeFill, 10, this.points); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.NotEqual(this.shapeOptions, processor.Options.ShapeOptions); this.VerifyPoints(this.points, processor.Shape); Assert.Equal(this.pen.StrokeFill, processor.Pen.StrokeFill); Assert.Equal(10, processor.Pen.StrokeWidth); }
public void BrushAndThicknessDefaultOptions() { this.operations.DrawBeziers(this.pen.StrokeFill, 10, this.points); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.Equal(this.shapeOptions, processor.Options.ShapeOptions); this.VerifyPoints(this.points, processor.Shape); Assert.Equal(this.pen.StrokeFill, processor.Pen.StrokeFill); Assert.Equal(10, processor.Pen.StrokeWidth); }
public void BrushAndThickness() { this.operations.Draw(new DrawingOptions(), this.pen.StrokeFill, 10, this.path); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.NotEqual(this.shapeOptions, processor.Options.ShapeOptions); Assert.Equal(this.path, processor.Path); Assert.Equal(this.pen.StrokeFill, processor.Pen.StrokeFill); Assert.Equal(10, processor.Pen.StrokeWidth); }
public void BrushAndThicknessDefaultOptions() { this.operations.Draw(this.pen.StrokeFill, 10, this.rectangle); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.Equal(this.shapeOptions, processor.Options.ShapeOptions); Assert.Equal(this.rectanglePolygon, processor.Shape); Assert.NotEqual(this.pen, processor.Pen); Assert.Equal(this.pen.StrokeFill, processor.Pen.StrokeFill); Assert.Equal(10, processor.Pen.StrokeWidth); }
public void BrushAndThickness() { this.operations.Draw(new DrawingOptions(), this.pen.StrokeFill, 10, this.rectangle); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.NotEqual(this.shapeOptions, processor.Options.ShapeOptions); Assert.True(RectangularPolygonValueComparer.Equals(this.RectanglePolygon, processor.Path)); Assert.NotEqual(this.pen, processor.Pen); Assert.Equal(this.pen.StrokeFill, processor.Pen.StrokeFill); Assert.Equal(10, processor.Pen.StrokeWidth); }
public void JointAndEndCapStyle() { this.operations.Draw(new DrawingOptions(), this.pen.StrokeFill, 10, this.rectangle); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.NotEqual(this.shapeOptions, processor.Options.ShapeOptions); Assert.True(RectangularPolygonValueComparer.Equals(this.RectanglePolygon, processor.Path)); Assert.NotEqual(this.pen, processor.Pen); Assert.Equal(this.pen.JointStyle, processor.Pen.JointStyle); Assert.Equal(this.pen.EndCapStyle, processor.Pen.EndCapStyle); }
public void ColorAndThickness() { this.operations.DrawBeziers(new ShapeGraphicsOptions(), Color.Red, 10, this.points); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.NotEqual(this.shapeOptions, processor.Options.ShapeOptions); this.VerifyPoints(this.points, processor.Shape); SolidBrush brush = Assert.IsType <SolidBrush>(processor.Pen.StrokeFill); Assert.Equal(Color.Red, brush.Color); Assert.Equal(10, processor.Pen.StrokeWidth); }
public void ColorAndThicknessDefaultOptions() { this.operations.DrawPolygon(Color.Red, 10, this.points); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.Equal(this.shapeOptions, processor.Options.ShapeOptions); this.VerifyPoints(this.points, processor.Shape); var brush = Assert.IsType <SolidBrush>(processor.Pen.StrokeFill); Assert.Equal(Color.Red, brush.Color); Assert.Equal(10, processor.Pen.StrokeWidth); }
public void ColorAndThickness() { this.operations.Draw(new DrawingOptions(), Color.Red, 10, this.path); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.NotEqual(this.shapeOptions, processor.Options.ShapeOptions); Assert.Equal(this.path, processor.Path); SolidBrush brush = Assert.IsType <SolidBrush>(processor.Pen.StrokeFill); Assert.Equal(Color.Red, brush.Color); Assert.Equal(10, processor.Pen.StrokeWidth); }
public void ColorAndThickness() { this.operations.Draw(new ShapeGraphicsOptions(), Color.Red, 10, this.rectangle); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.NotEqual(this.shapeOptions, processor.Options.ShapeOptions); Assert.Equal(this.rectanglePolygon, processor.Shape); Assert.NotEqual(this.pen, processor.Pen); var brush = Assert.IsType <SolidBrush>(processor.Pen.StrokeFill); Assert.Equal(Color.Red, brush.Color); Assert.Equal(10, processor.Pen.StrokeWidth); }
public void ColorAndThicknessDefaultOptions() { this.operations.Draw(Color.Red, 10, this.rectangle); DrawPathProcessor processor = this.Verify <DrawPathProcessor>(); Assert.Equal(this.shapeOptions, processor.Options.ShapeOptions); Assert.True(RectangularPolygonValueComparer.Equals(this.RectanglePolygon, processor.Path)); Assert.NotEqual(this.pen, processor.Pen); SolidBrush brush = Assert.IsType <SolidBrush>(processor.Pen.StrokeFill); Assert.Equal(Color.Red, brush.Color); Assert.Equal(10, processor.Pen.StrokeWidth); }
public void CorrectlySetsPenPathAndOptions() { img.Draw(pen, path, noneDefault); Assert.NotEmpty(img.ProcessorApplications); DrawPathProcessor <Color> processor = Assert.IsType <DrawPathProcessor <Color> >(img.ProcessorApplications[0].processor); Assert.Equal(noneDefault, processor.Options); ShapePath shapepath = Assert.IsType <ShapePath>(processor.Path); Assert.Equal(path, shapepath.Path); Assert.Equal(pen, processor.Pen); }
public void CorrectlySetsPenAndPath() { img.Draw(pen, path); Assert.NotEmpty(img.ProcessorApplications); DrawPathProcessor <Rgba32> processor = Assert.IsType <DrawPathProcessor <Rgba32> >(img.ProcessorApplications[0].processor); Assert.Equal(GraphicsOptions.Default, processor.Options); ShapePath shapepath = Assert.IsType <ShapePath>(processor.Path); Assert.Equal(path, shapepath.Path); Assert.Equal(pen, processor.Pen); }
public void CorrectlySetsPenPointsAndOptions() { img.DrawBeziers(pen, points, noneDefault); Assert.NotEmpty(img.ProcessorApplications); DrawPathProcessor <Color> processor = Assert.IsType <DrawPathProcessor <Color> >(img.ProcessorApplications[0].processor); Assert.Equal(noneDefault, processor.Options); ShapePath path = Assert.IsType <ShapePath>(processor.Path); SixLabors.Shapes.Path vector = Assert.IsType <SixLabors.Shapes.Path>(path.Path); BezierLineSegment segment = Assert.IsType <BezierLineSegment>(vector.LineSegments[0]); Assert.Equal(pen, processor.Pen); }
public void CorrectlySetsPenAndPoints() { img.DrawLines(pen, points); Assert.NotEmpty(img.ProcessorApplications); DrawPathProcessor <Rgba32> processor = Assert.IsType <DrawPathProcessor <Rgba32> >(img.ProcessorApplications[0].processor); Assert.Equal(GraphicsOptions.Default, processor.Options); ShapePath path = Assert.IsType <ShapePath>(processor.Path); SixLabors.Shapes.Path vector = Assert.IsType <SixLabors.Shapes.Path>(path.Path); LinearLineSegment segment = Assert.IsType <LinearLineSegment>(vector.LineSegments[0]); Assert.Equal(pen, processor.Pen); }
public void CorrectlySetsBrushThicknessAndPath() { img.Draw(brush, thickness, path); Assert.NotEmpty(img.ProcessorApplications); DrawPathProcessor <Rgba32> processor = Assert.IsType <DrawPathProcessor <Rgba32> >(img.ProcessorApplications[0].processor); Assert.Equal(GraphicsOptions.Default, processor.Options); ShapePath shapepath = Assert.IsType <ShapePath>(processor.Path); Assert.Equal(path, shapepath.Path); Pen <Rgba32> pen = Assert.IsType <Pen <Rgba32> >(processor.Pen); Assert.Equal(brush, pen.Brush); Assert.Equal(thickness, pen.Width); }
public void CorrectlySetsBrushThicknessPathAndOptions() { img.Draw(brush, thickness, path, noneDefault); Assert.NotEmpty(img.ProcessorApplications); DrawPathProcessor <Color> processor = Assert.IsType <DrawPathProcessor <Color> >(img.ProcessorApplications[0].processor); Assert.Equal(noneDefault, processor.Options); ShapePath shapepath = Assert.IsType <ShapePath>(processor.Path); Assert.Equal(path, shapepath.Path); Pen <Color> pen = Assert.IsType <Pen <Color> >(processor.Pen); Assert.Equal(brush, pen.Brush); Assert.Equal(thickness, pen.Width); }
public void CorrectlySetsBrushThicknessAndPoints() { img.DrawPolygon(brush, thickness, points); Assert.NotEmpty(img.ProcessorApplications); DrawPathProcessor <Color> processor = Assert.IsType <DrawPathProcessor <Color> >(img.ProcessorApplications[0].processor); Assert.Equal(GraphicsOptions.Default, processor.Options); ShapePath path = Assert.IsType <ShapePath>(processor.Path); Polygon vector = Assert.IsType <SixLabors.Shapes.Polygon>(path.Path); LinearLineSegment segment = Assert.IsType <LinearLineSegment>(vector.LineSegments[0]); Pen <Color> pen = Assert.IsType <Pen <Color> >(processor.Pen); Assert.Equal(brush, pen.Brush); Assert.Equal(thickness, pen.Width); }
public void CorrectlySetsBrushThicknessPointsAndOptions() { img.DrawLines(brush, thickness, points, noneDefault); Assert.NotEmpty(img.ProcessorApplications); DrawPathProcessor <Rgba32> processor = Assert.IsType <DrawPathProcessor <Rgba32> >(img.ProcessorApplications[0].processor); Assert.Equal(noneDefault, processor.Options); ShapePath path = Assert.IsType <ShapePath>(processor.Path); SixLabors.Shapes.Path vector = Assert.IsType <SixLabors.Shapes.Path>(path.Path); LinearLineSegment segment = Assert.IsType <LinearLineSegment>(vector.LineSegments[0]); Pen <Rgba32> pen = Assert.IsType <Pen <Rgba32> >(processor.Pen); Assert.Equal(brush, pen.Brush); Assert.Equal(thickness, pen.Width); }
public void CorrectlySetsPenRectangleAndOptions() { img.Draw(pen, rectangle, noneDefault); Assert.NotEmpty(img.ProcessorApplications); DrawPathProcessor <Rgba32> processor = Assert.IsType <DrawPathProcessor <Rgba32> >(img.ProcessorApplications[0].processor); Assert.Equal(noneDefault, processor.Options); ShapePath shapepath = Assert.IsType <ShapePath>(processor.Path); SixLabors.Shapes.Rectangle rect = Assert.IsType <SixLabors.Shapes.Rectangle>(shapepath.Path); Assert.Equal(rect.Location.X, rectangle.X); Assert.Equal(rect.Location.Y, rectangle.Y); Assert.Equal(rect.Size.Width, rectangle.Width); Assert.Equal(rect.Size.Height, rectangle.Height); Assert.Equal(pen, processor.Pen); }