public void Inverted() { var bound = new BoundingIntegerExtent2D(0, 0, 100, 100); bound.SetInverted(); bound.Should().BeEquivalentTo(new BoundingIntegerExtent2D(int.MaxValue, int.MaxValue, int.MinValue, int.MinValue)); }
/// <summary> /// Calculates the integer bounding rectangle within the bit mask sub grid that encloses all bits that /// are set to 1 (true) /// </summary> private BoundingIntegerExtent2D ComputeCellsExtents() { var SubGridCellsExtents = new BoundingIntegerExtent2D(); SubGridCellsExtents.SetInverted(); ScanAllSubGrids(x => { SubGridCellsExtents.Include(((SubGridTreeLeafBitmapSubGrid)x).ComputeCellsExtents()); return(true); }); return(SubGridCellsExtents); }