←Select platform

AnnClosedCurveObject Class

Summary

Defines a closed annotation curve object.

Remarks

The closed curve object is a spline curve that contains a collection of System.Windows.Point points, a stroke, a fill and a tension value. The curve can be AnnPolygonObject.IsClosed or not, and can also have a certain AnnPolygonObject.FillRule. For more information about the closed curve annotation object refer to AnnClosedCurveObject for WPF. For more information about the automated closed curve annotation object, refer to WPF Annotation Objects - Automated Features.

Example

This example creates a new closed curve object with 4 points.

C#
VB
Silverlight C#
Silverlight VB
using Leadtools.Windows.Annotations; 
using Leadtools.Windows.Controls; 
using Leadtools.Demos; 
using Leadtools.Help; 
 
private void AnnClosedCurveObject_AnnClosedCurveObject(AnnContainer container) 
{ 
   AnnClosedCurveObject closedCurve = new AnnClosedCurveObject(); 
   closedCurve.Points.Add(new Point(100, 100)); 
   closedCurve.Points.Add(new Point(200, 100)); 
   closedCurve.Points.Add(new Point(200, 200)); 
   closedCurve.Points.Add(new Point(100, 300)); 
   closedCurve.Tension = 1; 
   closedCurve.Stroke = Colors.Red; 
   closedCurve.Fill = Colors.White; 
   closedCurve.FillRule = AnnFillRule.EvenOdd; 
   closedCurve.StrokeThickness = 2.0; 
   closedCurve.IsClosed = true; 
   container.Children.Add(closedCurve); 
} 
Imports Leadtools.Windows.Annotations 
Imports Leadtools.Windows.Controls 
 
Private Sub AnnClosedCurveObject_AnnClosedCurveObject(ByVal container As AnnContainer) 
   Dim closedCurve As AnnClosedCurveObject = New AnnClosedCurveObject() 
   closedCurve.Points.Add(New System.Windows.Point(100, 100)) 
   closedCurve.Points.Add(New System.Windows.Point(200, 100)) 
   closedCurve.Points.Add(New System.Windows.Point(200, 200)) 
   closedCurve.Points.Add(New System.Windows.Point(100, 300)) 
   closedCurve.Tension = 1 
   closedCurve.Stroke = Colors.Red 
   closedCurve.StrokeThickness = 2.0 
   closedCurve.Fill = Colors.White 
   closedCurve.FillRule = AnnFillRule.EvenOdd 
   closedCurve.IsClosed = True 
   container.Children.Add(closedCurve) 
End Sub 
using Leadtools.Windows.Annotations; 
using Leadtools.Windows.Controls; 
using Leadtools.Examples; 
//using Leadtools.Help; 
 
private void AnnClosedCurveObject_AnnClosedCurveObject(AnnContainer container) 
{ 
   AnnClosedCurveObject closedCurve = new AnnClosedCurveObject(); 
   closedCurve.Points.Add(new Point(100, 100)); 
   closedCurve.Points.Add(new Point(200, 100)); 
   closedCurve.Points.Add(new Point(200, 200)); 
   closedCurve.Points.Add(new Point(100, 300)); 
   closedCurve.Tension = 1; 
   closedCurve.Stroke = Colors.Red; 
   closedCurve.Fill = Colors.White; 
   closedCurve.FillRule = AnnFillRule.EvenOdd; 
   closedCurve.StrokeThickness = 2.0; 
   closedCurve.IsClosed = true; 
   container.Children.Add(closedCurve); 
} 
Imports Leadtools.Windows.Annotations 
Imports Leadtools.Windows.Controls 
 
Private Sub AnnClosedCurveObject_AnnClosedCurveObject(ByVal container As AnnContainer) 
   Dim closedCurve As AnnClosedCurveObject = New AnnClosedCurveObject() 
   closedCurve.Points.Add(New Point(100, 100)) 
   closedCurve.Points.Add(New Point(200, 100)) 
   closedCurve.Points.Add(New Point(200, 200)) 
   closedCurve.Points.Add(New Point(100, 300)) 
   closedCurve.Tension = 1 
   closedCurve.Stroke = Colors.Red 
   closedCurve.Fill = Colors.White 
   closedCurve.FillRule = AnnFillRule.EvenOdd 
   closedCurve.StrokeThickness = 2.0 
   closedCurve.IsClosed = True 
   container.Children.Add(closedCurve) 
End Sub 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Windows.Annotations Assembly