public void CorrectlySetsBrushRectangleAndOptions() { this.operations.Fill(this.noneDefault, this.brush, this.rectangle); FillRegionProcessor <Rgba32> processor = this.Verify <FillRegionProcessor <Rgba32> >(); Assert.Equal(this.noneDefault, processor.Options); ShapeRegion region = Assert.IsType <ShapeRegion>(processor.Region); Shapes.RectangularPolygon rect = Assert.IsType <Shapes.RectangularPolygon>(region.Shape); Assert.Equal(rect.Location.X, this.rectangle.X); Assert.Equal(rect.Location.Y, this.rectangle.Y); Assert.Equal(rect.Size.Width, this.rectangle.Width); Assert.Equal(rect.Size.Height, this.rectangle.Height); Assert.Equal(this.brush, processor.Brush); }
public void CorrectlySetsBrushAndRectangle() { this.operations.Fill(this.brush, this.rectangle); FillRegionProcessor processor = this.Verify <FillRegionProcessor>(); Assert.Equal(new GraphicsOptions(), processor.Options, graphicsOptionsComparer); ShapeRegion region = Assert.IsType <ShapeRegion>(processor.Region); Shapes.RectangularPolygon rect = Assert.IsType <Shapes.RectangularPolygon>(region.Shape); Assert.Equal(rect.Location.X, this.rectangle.X); Assert.Equal(rect.Location.Y, this.rectangle.Y); Assert.Equal(rect.Size.Width, this.rectangle.Width); Assert.Equal(rect.Size.Height, this.rectangle.Height); Assert.Equal(this.brush, processor.Brush); }
public void CorrectlySetsColorAndRectangle() { this.operations.Fill(this.color, this.rectangle); FillRegionProcessor <Rgba32> processor = this.Verify <FillRegionProcessor <Rgba32> >(); Assert.Equal(GraphicsOptions.Default, processor.Options); ShapeRegion region = Assert.IsType <ShapeRegion>(processor.Region); Shapes.RectangularPolygon rect = Assert.IsType <Shapes.RectangularPolygon>(region.Shape); Assert.Equal(rect.Location.X, this.rectangle.X); Assert.Equal(rect.Location.Y, this.rectangle.Y); Assert.Equal(rect.Size.Width, this.rectangle.Width); Assert.Equal(rect.Size.Height, this.rectangle.Height); SolidBrush <Rgba32> brush = Assert.IsType <SolidBrush <Rgba32> >(processor.Brush); Assert.Equal(this.color, brush.Color); }