ExtendedBitmap() { this.Cache = new ExtendedBitmap.PropertyCache(); this._isNew = true; this._isInitialised = false; }
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; } }
public ExtendedBitmap(int x, int y) { this.Cache = new ExtendedBitmap.PropertyCache() { Size = new Size(x, y) }; this.Initialise(); }
public ExtendedBitmap(Size imageSize) { this.Cache = new ExtendedBitmap.PropertyCache() { Size = imageSize }; this.Initialise(); }
public ExtendedBitmap(string fileName) { this.Cache = new ExtendedBitmap.PropertyCache(); this.Initialise(fileName); }