コード例 #1
0
        ExtendedBitmap()

        {
            this.Cache          = new ExtendedBitmap.PropertyCache();
            this._isNew         = true;
            this._isInitialised = false;
        }
コード例 #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;
            }
        }
コード例 #3
0
 public ExtendedBitmap(int x, int y)
 {
     this.Cache = new ExtendedBitmap.PropertyCache()
     {
         Size = new Size(x, y)
     };
     this.Initialise();
 }
コード例 #4
0
 public ExtendedBitmap(Size imageSize)
 {
     this.Cache = new ExtendedBitmap.PropertyCache()
     {
         Size = imageSize
     };
     this.Initialise();
 }
コード例 #5
0
 public ExtendedBitmap(string fileName)
 {
     this.Cache = new ExtendedBitmap.PropertyCache();
     this.Initialise(fileName);
 }