'...
'Create an instance of ImageElement class
Dim imgElem As Neodynamic.SDK.ImageElement
imgElem = Neodynamic.SDK.ImageElement.FromUrl("~/images/night.jpg")
'Create an instance of BitmapMask class
Dim fxBitmapMask As New Neodynamic.SDK.BitmapMask()
fxBitmapMask.MaskFile = "~/images/mask.png"
'Apply the action on the ImageElement
imgElem.Actions.Add(fxBitmapMask)
'Add the ImageElement to the Elements collection of the ImageDraw control
Me.ImageDraw1.Elements.Add(imgElem)
'...
//...
//Create an instance of ImageElement class
Neodynamic.SDK.ImageElement imgElem = Neodynamic.SDK.ImageElement.FromUrl("~/images/night.jpg");
//Create an instance of BitmapMask class
Neodynamic.SDK.BitmapMask fxBitmapMask = new Neodynamic.SDK.BitmapMask();
fxBitmapMask.MaskFile = "~/images/mask.png";
//Apply the action on the ImageElement
imgElem.Actions.Add(fxBitmapMask);
//Add the ImageElement to the Elements collection of the ImageDraw controlthis.ImageDraw1.Elements.Add(imgElem);
//...
This action performs alpha channel bitmap masking on an Element. Bitmap Masking means that the pixels of a mask object affect the visibility of the underlying object i.e. of the target element.
In the following example we have an ImageElement on the Canvas and a BitmapMask action is applied on the ImageElement.
ImageElement before the action is applied.
The image used for masking and specified in the BitmapMask action.
ImageElement with BitmapMask action applied on it.