Defines a closed annotation curve object.
public class AnnClosedCurveObject : Leadtools.Windows.Annotations.AnnPolygonObject, Leadtools.Windows.Annotations.IAnnCurve, Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnPolygon, Leadtools.Windows.Annotations.IAnnPolyline
Public Class AnnClosedCurveObject
Inherits Leadtools.Windows.Annotations.AnnPolygonObject
Implements Leadtools.Windows.Annotations.IAnnCurve, Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnPolygon, Leadtools.Windows.Annotations.IAnnPolyline
public ref class AnnClosedCurveObject : public Leadtools.Windows.Annotations.AnnPolygonObject, Leadtools.Windows.Annotations.IAnnCurve, Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnPolygon, Leadtools.Windows.Annotations.IAnnPolyline
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.
This example creates a new closed curve object with 4 points.
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.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);
}
using Leadtools.Windows.Annotations;
using Leadtools.Windows.Controls;
using Leadtools.Examples;
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
<Window x:Class="WPFSamples.AnnClosedCurveObject"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Leadtools.Windows.Annotations" Height="600" Width="800"
xmlns:Leadtools_Windows_Annotations="clr-namespace:Leadtools.Windows.Annotations;assembly=Leadtools.Windows.Annotations"
>
<Leadtools_Windows_Annotations:AnnClosedCurveObject
Stroke="Blue"
StrokeThickness="3.0"
FillRule="EvenOdd"
IsClosed="True"
Tension="1.0"
Points="100,100 175, 125, 25,150 175,175 100,200"
Header="Closed Curve Object">
<Leadtools_Windows_Annotations:AnnClosedCurveObject.Fill>
<LinearGradientBrush>
<GradientStop Offset="0.0" Color="Black" />
<GradientStop Offset="0.5" Color="Red" />
<GradientStop Offset="1.0" Color="Yellow" />
</LinearGradientBrush>
</Leadtools_Windows_Annotations:AnnClosedCurveObject.Fill>
</Leadtools_Windows_Annotations:AnnClosedCurveObject>
</Window>
Products |
Support |
Feedback: AnnClosedCurveObject Class - Leadtools.Windows.Annotations |
Introduction |
Help Version 19.0.2017.3.22
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.