void SetBlendMode( BlendMode blendMode )

book_4_sparkGenerated
code_blocksInput

Description

The SetBlendMode method allows you to set the blending mode for drawing operations on a Bitmap object. The blending mode determines how the colors of the bitmap are combined with the colors of the background or other bitmaps when drawing.

Usage

To use the SetBlendMode method, you need to pass a BlendMode enumeration value that specifies the desired blending mode. This method does not return a value.

Example

// Create a new Bitmap instance
Bitmap bitmap = new Bitmap();

// Set the blend mode to Alpha
bitmap.SetBlendMode(BlendMode.Alpha);

// Now, any drawing operations on this bitmap will use the Alpha blend mode.