Пример #1
0
        public object Clone()
        {
            DiskBackedSurface retval = new DiskBackedSurface(this.surface, true);

            retval.state       = this.state;
            retval.backingfile = this.backingfile;
            return(retval);
        }
Пример #2
0
        public HistoryItem(Surface surface, Rectangle bounds)
        {
            DeltaRect = Rectangle.Intersect(surface.Bounds, bounds);
            Surface temp;

            if (DeltaRect.Width * DeltaRect.Height > 0)
            {
                temp = new Surface(DeltaRect.Size);
                temp.CopySurface(surface, temp.Bounds.Location, DeltaRect);
            }
            else
            {
                temp             = new Surface(1, 1);
                DeltaRect.Width  = 1;
                DeltaRect.Height = 1;
            }
            DeltaSurface = new DiskBackedSurface(temp, true);
            DeltaSurface.ToDisk();
            temp.Dispose();
        }
Пример #3
0
 public HistoryItem(Surface surface)
 {
     DeltaRect    = surface.Bounds;
     DeltaSurface = new DiskBackedSurface(surface, false);
     DeltaSurface.ToDisk();
 }