public void CreateNew(RectangleF rgFrame, Size uiFrame)
        {
            var scene = new RGScene(rgFrame, uiFrame);

            _displayedTransformation = new DirectRGTransformationC1C2();
            scene.ApplyTransformation(_displayedTransformation, this);
            Push(scene);
        }
Exemple #2
0
 public void ApplyTransformation(RGSceneTransform transform, RGProcessor processor)
 {
     lock (OriginalImage)
     {
         var tImage = new Bitmap(OriginalImage);
         using (var layer = transform.GetLayer(_rgFrame, _uiFrame, this, processor))
         {
             for (var i = 0; i < tImage.Width; i++)
             {
                 for (var j = 0; j < tImage.Height; j++)
                 {
                     var clr = layer.GetPixel(i, j);
                     if (clr != BackgroundColr)
                     {
                         tImage.SetPixel(i, j, clr);
                     }
                 }
             }
             OriginalImage = tImage;
             ResultedImage = new Bitmap(OriginalImage);
         }
     }
 }