Exemplo n.º 1
0
        public PixelEntry Clone()
        {
            var clone = new PixelEntry();

            clone.Character = Character;
            clone.Color     = Color;
            return(clone);
        }
        private void SelectPixel(object param)
        {
            PixelEntry pixel      = (PixelEntry)param;
            bool       dirtyPixel = false;

            if (CanPaintCharacters)
            {
                if (pixel.Character != SelectedCharacter)
                {
                    dirtyPixel      = true;
                    pixel.Character = SelectedCharacter;
                }
            }
            if (pixel.Color != SelectedColor)
            {
                dirtyPixel  = true;
                pixel.Color = SelectedColor;
            }
            if (dirtyPixel)
            {
                AddHistoryState("Paint Pixel");
                IsDirty = true;
            }
        }