'...
'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 PerspectiveReflection class
Dim reflection As New Neodynamic.WebControls.ImageDraw.PerspectiveReflection()
reflection.Angle = 270;
reflection.Opacity = 50;
reflection.Length = 50;
reflection.WidthPercentage = 150;
'Apply the action on the ImageElement
imgElem.Actions.Add(reflection)
'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 PerspectiveReflection class
Neodynamic.WebControls.ImageDraw.PerspectiveReflection reflection = new Neodynamic.WebControls.ImageDraw.PerspectiveReflection();
reflection.Angle = 270;
reflection.Opacity = 50;
reflection.Length = 50;
reflection.WidthPercentage = 150;
//Apply the action on the ImageElement
imgElem.Actions.Add(reflection);
//Add the ImageElement to the Elements collection of the ImageDraw control
this.ImageDraw1.Elements.Add(imgElem);
//...
...
<neoimg:imagedraw id="ImageDraw1" runat="server">
<Canvas AutoSize="True" />
<Elements>
<neoimg:ImageElement Source="File" SourceFile="~/images/night.jpg">
<Actions>
<neoimg:PerspectiveReflection Angle="270" Length="50" Opacity="50" WidthPercentage="150" />
</Actions>
</neoimg:ImageElement>
</Elements>
</neoimg:imagedraw>
...
PerspectiveReflection
Represented by
Neodynamic.WebControls.ImageDraw.PerspectiveReflection class.
This action adds perspective reflection to an
Element.
ImageDraw makes it easy to apply perspective reflection to any Element allowing you to specify similar settings as PrespectiveShadow action.
In the following example we have an
ImageElement on the
Canvas and a simple
PerspectiveReflection action is applied on the
ImageElement.
ImageElement before the action is applied. |
ImageElement with PerspectiveReflection action applied on it. |