'...
'Create an instance of ImageElement class
Dim imgElem As Neodynamic.WebControls.ImageDraw.ImageElement
imgElem = Neodynamic.WebControls.ImageDraw.ImageElement.FromUrl("~/images/night.jpg")
'Create an instance of BitmapMask class
Dim fxBitmapMask As New Neodynamic.WebControls.ImageDraw.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.WebControls.ImageDraw.ImageElement imgElem = Neodynamic.WebControls.ImageDraw.ImageElement.FromUrl("~/images/night.jpg");
//Create an instance of BitmapMask class
Neodynamic.WebControls.ImageDraw.BitmapMask fxBitmapMask = new Neodynamic.WebControls.ImageDraw.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.