Example #1
0
        ExtendedBitmap()

        {
            this.Cache          = new ExtendedBitmap.PropertyCache();
            this._isNew         = true;
            this._isInitialised = false;
        }
Example #2
0
        void Initialise(string fileName)

        {
            if (this._surface != null)
            {
                this._surface.Dispose();
            }
            if (this._bits != null)
            {
                this._bits.Dispose();
            }
            if (!File.Exists(fileName))
            {
                this.Cache = new ExtendedBitmap.PropertyCache()
                {
                    Size = new Size(32, 32)
                };
                this.Initialise();
            }
            else
            {
                this._bits    = new Bitmap(fileName);
                this._surface = Graphics.FromImage((Image)this._bits);
                this.Cache.Update(ref this._bits);
                this._surface.Clip = new Region(this.Cache.Bounds);
                this.Cache.Update(ref this._surface);
                this._isNew         = true;
                this._isInitialised = true;
            }
        }
Example #3
0
 public ExtendedBitmap(int x, int y)
 {
     this.Cache = new ExtendedBitmap.PropertyCache()
     {
         Size = new Size(x, y)
     };
     this.Initialise();
 }
Example #4
0
 public ExtendedBitmap(Size imageSize)
 {
     this.Cache = new ExtendedBitmap.PropertyCache()
     {
         Size = imageSize
     };
     this.Initialise();
 }
Example #5
0
 public ExtendedBitmap(string fileName)
 {
     this.Cache = new ExtendedBitmap.PropertyCache();
     this.Initialise(fileName);
 }