Beispiel #1
0
 public void HandleSource(BitmapSource source)
 {
     Color[,] samples = BitmapManipulator.SampleBitmapSource(source, PixelsHigh, PixelsWide);
     Colors           = samples;
     BitTile          = BitmapManipulator.CreateBitTile(samples, 1, PixelsHigh, PixelsWide);
     _undo.Clear();
 }
Beispiel #2
0
 public void Undo()
 {
     if (_undo.Count > 0)
     {
         Colors  = _undo.Pop();
         BitTile = BitmapManipulator.CreateBitTile(Colors, 1, PixelsHigh, PixelsWide);
     }
 }
Beispiel #3
0
        public void NewSheet(int height, int width, int pixelWidth)
        {
            _undo.Clear();

            PixelsHigh  = height;
            PixelsWide  = width;
            SizeOfPixel = pixelWidth;
            Colors      = new Color[PixelsHigh, PixelsWide];
            for (int i = 0; i < PixelsHigh; i++)
            {
                for (int j = 0; j < PixelsWide; j++)
                {
                    Colors[i, j] = Color.FromArgb(0xff, 0xff, 0xff, 0xff);
                }
            }
            BitTile = BitmapManipulator.CreateBitTile(Colors, 1, PixelsHigh, PixelsWide);
        }