Example #1
0
 private void create()
 {
     D.Assert(!this.created);
     D.Assert(!this.locked);
     this.bitmapHandle = FPDFBitmapCache.FPDFBitmap_Create(this.allocatedSize.Width, this.allocatedSize.Height, 1);
     this.created      = true;
 }
Example #2
0
 private void dispose()
 {
     D.Assert(!this.locked);
     if (this.created)
     {
         FPDFBitmapCache.FPDFBitmap_Destroy(this.bitmapHandle);
         this.created = false;
     }
 }
Example #3
0
 public int Get(int width, int height)
 {
     D.Assert(!this.locked);
     if (!this.created || width != this.allocatedSize.Width || height != this.allocatedSize.Height)
     {
         this.dispose();
         this.allocatedSize = new Size(width, height);
         this.create();
     }
     D.Assert(this.created && width == this.allocatedSize.Width && height == this.allocatedSize.Height);
     this.locked = true;
     FPDFBitmapCache.FPDFBitmap_FillRect(this.bitmapHandle, 0, 0, this.allocatedSize.Width, this.allocatedSize.Height, 255, 255, 255, 255);
     return(this.bitmapHandle);
 }