Location: `bitmapmethods.h` Link against: `bitgdi.lib`

# Namespace `NBitmapMethods`

`NNBitmapMethods`

#### Support

Supported from 5.0

#### Description

A set of functions to make bitmap manipulation easier.

Defined in `NBitmapMethods`:
`CreateGraphicsContextLC()`, `CreateGraphicsContextL()`, `CreateBitmapDeviceLC()`, `CreateBitmapDeviceL()`, `CreateBitmapLC()`, `CreateBitmapL()`, `BitBltMaskedEntireBitmap()`, `PartialReset()`

## Bitmap methods

### `CreateGraphicsContextLC()`

`CFbsBitGc* CreateGraphicsContextLC(CFbsBitmapDevice& aBitmapDevice);`

#### Description

Create a graphics context and leave it on the cleanup stack.

#### Parameters

`CFbsBitmapDevice& aBitmapDevice` | A reference to a bitmap device.

### `CreateGraphicsContextL()`

`CFbsBitGc* CreateGraphicsContextL(CFbsBitmapDevice& aBitmapDevice);`

#### Description

Create a graphics context.

#### Parameters

`CFbsBitmapDevice& aBitmapDevice` | A reference to a bitmap device.

### `CreateBitmapDeviceLC()`

`CFbsBitmapDevice* CreateBitmapDeviceLC(CFbsBitmap& aBitmap);`

#### Description

Create a bitmap device and leave it on the cleanup stack.

#### Parameters

`CFbsBitmapDevice& aBitmap` | A reference to a bitmap device.

### `CreateBitmapDeviceL()`

`CFbsBitmapDevice* CreateBitmapDeviceL(CFbsBitmap& aBitmap);`

#### Description

Create a bitmap device.

#### Parameters

`CFbsBitmap& aBitmap` | A reference to a bitmap.

### `CreateBitmapLC`

`CFbsBitmap* CreateBitmapLC(TSize aSizeInPixels,TDisplayMode aDispMode);
CFbsBitmap* CreateBitmapLC(const TDesC& aFileName,TInt aId);`

#### Description

Create a bitmap and leave it on the cleanup stack. Create a bitmap from an mbm file and leave it on the cleanup stack.

#### Parameters

`TSize aSizeInPixels` | The size of the bitmap to be created.
`TDisplayMode aDispMode` | The display mode of the bitmap.
`const TDesC& aFileName` | The name of an mbm file.
`TInt aId` | The position of the bitmap in the mbm file.

### `CreateBitmapL`

`CFbsBitmap* CreateBitmapL(TSize aSizeInPixels,TDisplayMode aDispMode);
CFbsBitmap* CreateBitmapLC(const TDesC& aFileName,TInt aId);`

#### Description

Create a bitmap. Create a bitmap from an mbm file.

#### Parameters

`TSize aSizeInPixels` | The size of the bitmap to be created.
`TDisplayMode aDispMode` | The display mode of the bitmap.
`const TDesC& aFileName` | The name of an mbm file.
`TInt aId` | The position of the bitmap in the mbm file.

### `BitBltMaskedEntireBitmap()`

`void BitBltMaskedEntireBitmap(CFbsBitGc& aTargetGc,TPoint aTopLeft,const CFbsBitmap& aBitmap, const CFbsBitmap& aBitMask);`

#### Description

Blit the entire of a bitmap with a mask onto a gc.

#### Parameters

`CFbsBitGc& aTargetGc` | Gc to blit onto.
`TPoint aTopLeft` | The position at which the top left of the bitmap will be placed on the gc.
`const CFbsBitmap& aBitmap` | The bitmap to blit.
`const CFbsBitmap& aBitMask` | The mask.

### `PartialReset()`

`void PartialReset(CFbsBitGc& aGc);`

#### Description

Reset a gc so that it is in a sensible state. Not all settings are reset, just some of the more useful ones.

#### Parameters

`CFbsBitGc& aGc` | The gc to reset.