TypeLib Xojo support Plugin

RawBitmapMask.CreateVerticalFadingMask Method

Creates a vertical fading mask that starts its fade at given location and has a given height.

shared CreateVerticalFadingMask(
   start as UInt32,
   height as UInt32) as RawBitmapMask

Parameters

start
Starting vertical location of the fading mask.
height
The height of the fading mask.

Returns

RawBitmapMask
Instance of RawBitmapMask.

Remarks

Use the Inverted property if you want to flip around on which side the mask is solid and which it is not.

Note the example bellow and the picture is showing Horizontal fading, not vertical fading like this function does.

In this example we create horizontal fading mask and apply it to the Sepia effect in the PictureEffectsRaw plugin:


Dim effect as SepiaEffectRaw = new SepiaEffectRaw()
effect.Mask = RawBitmapMask.CreateHorizontalFadingMask(25, m_PictureSource.Width - 50)

result = effect.Apply(m_PictureSource,35)



And the result is:



Full sepia at left side for the first 25 pixels, then fades from sepia to normal picture for the Pictures width - 50 and then finally full normal picture for last 25 pixels.

See Also

RawBitmapMask Class