public void CorrectlySetsBrushThicknessAndPath() { img.Draw(brush, thickness, path); Assert.NotEmpty(img.ProcessorApplications); DrawPathProcessor <Color> processor = Assert.IsType <DrawPathProcessor <Color> >(img.ProcessorApplications[0].processor); Assert.Equal(GraphicsOptions.Default, 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 CorrectlySetsBrushThicknessAndRectangle() { img.Draw(brush, 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(brush, pen.Brush); Assert.Equal(thickness, pen.Width); }