Leadtools.Windows.Annotations Namespace > AnnAutomation Class : Realize Method |
public virtual void Realize()
'Declaration Public Overridable Sub Realize()
'Usage Dim instance As AnnAutomation instance.Realize()
public virtual void Realize()
function Leadtools.Windows.Annotations.AnnAutomation.Realize()
public: virtual void Realize();
This method will draw the annotation objects inside the Container into the System.Windows.Media.Imaging.BitmapSource currently in the Leadtools.Windows.Controls.ImageViewer.
Only visible objects will be painted on the System.Windows.Media.Imaging.BitmapSource.
This method will draw the objects exactly as they would be painted in the current AnnUserMode, unless the System.Windows.Media.Imaging.BitmapSource.Format is System.Windows.Media.PixelFormats.BlackWhite.
Please note that Undo does not work for this operation.
Private Sub AnnAutomation_Realize(ByVal automation As AnnAutomation) ' make sure no objects are selected automation.SelectNone() ' add a text object and select it Dim text As AnnTextObject = New AnnTextObject() text.FontFamilyName = "Arial" text.FontSize = 20 text.FontWeight = AnnFontWeight.Bold text.Foreground = Colors.Red text.Text = "Realize Text Object!" text.Rect = New Rect(100, 100, 200, 200) automation.Container.Children.Add(text) automation.Realize() End Sub
private void AnnAutomation_Realize(AnnAutomation automation) { // make sure no objects are selected automation.SelectNone(); // add a text object and select it AnnTextObject text = new AnnTextObject(); text.FontWeight = AnnFontWeight.Bold; text.FontFamilyName = "Arial"; text.FontSize = 20; text.Foreground = Colors.Red; text.Rect = new Rect(100, 100, 200, 200); text.Text = "Realize Text Object!"; automation.Container.Children.Add(text); automation.Realize(); }
private void AnnAutomation_Realize(AnnAutomation automation) { // make sure no objects are selected automation.SelectNone(); // add a text object and select it AnnTextObject text = new AnnTextObject(); text.FontWeight = AnnFontWeight.Bold; text.FontFamilyName = "Arial"; text.FontSize = 20; text.Foreground = Colors.Red; text.Rect = new Rect(100, 100, 200, 200); text.Text = "Realize Text Object!"; automation.Container.Children.Add(text); automation.Realize(); }
Private Sub AnnAutomation_Realize(ByVal automation As AnnAutomation) ' make sure no objects are selected automation.SelectNone() ' add a text object and select it Dim text As AnnTextObject = New AnnTextObject() text.FontWeight = AnnFontWeight.Bold text.FontFamilyName = "Arial" text.FontSize = 20 text.Foreground = Colors.Red text.Rect = New Rect(100, 100, 200, 200) text.Text = "Realize Text Object!" automation.Container.Children.Add(text) automation.Realize() End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2