private void FillRegion(
            Region region,
            LockableBitmap lockableBitmap)
        {
            Color color;

            if (!ColorMapper.TryMap(region.Number, out color))
            {
                color = colorGenerator.RandomColor();
            }

            foreach (ScanInfo info in region.Infos)
            {
                lockableBitmap.SetPixel(info.Coords.X, info.Coords.Y, color);
            }
        }
Exemple #2
0
        private void FillRegion(
            int regionIndex,
            KeyValuePair <int, List <ScanInfo> > region,
            LockableBitmap lockableBitmap)
        {
            Color color;

            if (!ColorMapper.TryMap(regionIndex, out color))
            {
                color = colorGenerator.RandomColor();
            }

            foreach (ScanInfo info in region.Value)
            {
                lockableBitmap.SetPixel(info.Coords.X, info.Coords.Y, color);
            }
        }