public BinaryMap FillCornerAreas(BlockMap blocks) { BinaryMap result = new BinaryMap(blocks.PixelCount); Parallel.For(0, blocks.CornerCount.Height, delegate(int cornerY) { for (int cornerX = 0; cornerX < blocks.CornerCount.Width; ++cornerX) { if (GetBit(cornerX, cornerY)) { result.Fill(blocks.CornerAreas[cornerY, cornerX]); } } }); return(result); }
public BinaryMap FillBlocks(BlockMap blocks) { BinaryMap result = new BinaryMap(blocks.PixelCount); Parallel.For(0, blocks.BlockCount.Height, delegate(int blockY) { for (int blockX = 0; blockX < blocks.BlockCount.Width; ++blockX) { if (GetBit(blockX, blockY)) { result.Fill(blocks.BlockAreas[blockY, blockX]); } } }); return(result); }