コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }