BB FlashBack SDK: The FBGDIBitmap Classes

The FBGDIBitmap Class

This is a helper class that .NET programmers can use with the FBFrames::DrawCursor method, which requires a device context handle.

Sample usage:

int width = 32;
int height = 32;

FBGDIBitmap gdibmp = new FBGDIBitmap();

gdibmp.Create(width, height, 32);

Bitmap bmp1 = new Bitmap(width, height, PixelFormat.Format32bppRgb);

Graphics g1 = Graphics.FromImage(bmp1);
g1.FillRectangle(new SolidBrush(Color.White), 0, 0, width, height);

Graphics gdi_g = Graphics.FromHdc((IntPtr)gdibmp.GetContext());
gdi_g.DrawImage(bmp1, 0, 0);
gdi_g.Dispose();

FBFrames frames = fbEditor.GetFrames();
frames.DrawCursor(10, 0, 0, gdibmp.GetContext());

IntPtr hdc = g1.GetHdc();

gdibmp.CopyToContext((int)hdc, 0, 0, width, height, 0, 0);

g1.ReleaseHdc(hdc);

Methods
GetContext
GetHandle
FreeResources
Create
SaveToFile
CopyToContext
 

Properties
Bits
Width
Height