[]
        
(Showing Draft Content)

GrapeCity.Documents.Imaging.GrayscaleBitmap.ToShadowBitmap

ToShadowBitmap Method

ToShadowBitmap(Color, float, bool)

Creates a semi-transparent GcBitmap from the current GrayscaleBitmap.

This method treats the current GrayscaleBitmap as a transparency mask, regardless of the TransparencyMask property value.

Declaration
public GcBitmap ToShadowBitmap(Color shadowColor, float opacityFactor = 1, bool zeroIsOpaque = false)
Public Function ToShadowBitmap(shadowColor As Color, Optional opacityFactor As Single = 1, Optional zeroIsOpaque As Boolean = False) As GcBitmap
Parameters
Type Name Description
Color shadowColor

The color to fill opaque pixels of the target bitmap.

float opacityFactor

Additional factor to scale the alpha channel.

bool zeroIsOpaque

Specifies whether zero values correspond to fully opaque (true) or fully transparent (false) pixels.

Returns
Type Description
GcBitmap

The newly created GcBitmap.

ToShadowBitmap(GcBitmap, Color, float, bool)

Converts an existing instance of GcBitmap to a semi-transparent bitmap representing the current GrayscaleBitmap.

This method treats the current GrayscaleBitmap as a transparency mask, regardless of the TransparencyMask property value.

Declaration
public void ToShadowBitmap(GcBitmap bmp, Color shadowColor, float opacityFactor = 1, bool zeroIsOpaque = false)
Public Sub ToShadowBitmap(bmp As GcBitmap, shadowColor As Color, Optional opacityFactor As Single = 1, Optional zeroIsOpaque As Boolean = False)
Parameters
Type Name Description
GcBitmap bmp

The target GcBitmap object.

Color shadowColor

The color to fill opaque pixels of the target bitmap.

float opacityFactor

Additional factor to scale the alpha channel.

bool zeroIsOpaque

Specifies whether zero values correspond to fully opaque (true) or fully transparent (false) pixels.