public bool IsMasked_WithProjection_Test(int width, int height, float x, float y, float projectionLeft, float projectionBottom, float scaleX, float scaleY, params int[] pointsInMask) { bool[][] array = GetArray(width, height, true, pointsInMask); AGSMask mask = new AGSMask(array, null); Mock<ISquare> square = new Mock<ISquare> (); AGS.API.PointF bottomLeft = new AGS.API.PointF (projectionLeft, projectionBottom); AGS.API.PointF bottomRight = new AGS.API.PointF (projectionLeft + width * Math.Abs(scaleX), projectionBottom); AGS.API.PointF topLeft = new AGS.API.PointF (projectionLeft, projectionBottom + height * Math.Abs(scaleY)); AGS.API.PointF topRight = new AGS.API.PointF (projectionLeft + width * Math.Abs(scaleX), projectionBottom + height * Math.Abs(scaleY)); square.Setup(s => s.BottomLeft).Returns(bottomLeft); square.Setup(s => s.BottomRight).Returns(bottomRight); square.Setup(s => s.TopLeft).Returns(topLeft); square.Setup(s => s.TopRight).Returns(topRight); return mask.IsMasked(new AGS.API.PointF (x, y), square.Object, scaleX, scaleY); }
public bool IsMaskedTest(int width, int height, float x, float y, params int[] pointsInMask) { bool[][] array = GetArray(width, height, true, pointsInMask); AGSMask mask = new AGSMask(array, null); return mask.IsMasked(new AGS.API.PointF (x, y)); }