←Select platform

AnnArrowLineEnding Class

Summary

Defines an AnnArrowLineEnding style.

Syntax
C#
C++/CLI
Python
public class AnnArrowLineEnding : AnnLineEnding 
public: 
   ref class AnnArrowLineEnding : AnnLineEnding 
class AnnArrowLineEnding(AnnLineEnding): 
Remarks

The AnnArrowLineEnding style represents the ending style as an arrow. The AnnArrowLineEnding class inherits a number of properties from the AnnLineEnding class, providing support for fill, stroke and length characteristics. It also defines its own properties that control how the arrow can look:

Example
C#
using Leadtools.Annotations.Automation; 
using Leadtools.Annotations.Engine; 
using Leadtools.Codecs; 
using Leadtools.Annotations; 
using Leadtools.Annotations.WinForms; 
 
public void AnnCore_AnnLineEnding() 
{ 
   // assumes _automation is valid 
 
 
   double inch = 720.0; 
 
   // Create polyline object and add it the automation container   
   AnnPolylineObject polyLine = new AnnPolylineObject(); 
   polyLine.Points.Add(LeadPointD.Create(1 * inch, 1 * inch)); 
   polyLine.Points.Add(LeadPointD.Create(2 * inch, 1 * inch)); 
   _automation.Container.Children.Add(polyLine); 
 
 
   // Create arrow line ending style and set some properties 
   AnnArrowLineEnding arrowStyle = new AnnArrowLineEnding(); 
   arrowStyle.Closed = true; 
   arrowStyle.Reversed = true; 
   arrowStyle.Fill = AnnSolidColorBrush.Create("Yellow"); 
   // Set the the created arrow style to polyline start and end style 
   polyLine.StartStyle = arrowStyle; 
   polyLine.EndStyle = arrowStyle; 
 
   // Previewing start and end line styles 
   AnnLineEnding annLineStart = polyLine.StartStyle; 
   AnnLineEnding annLineEnding = polyLine.EndStyle; 
   Debug.WriteLine($"Line start style: {annLineStart.FriendlyName } | Line end style: {annLineEnding.FriendlyName}"); 
 
   // Create another polyline object and add it the automation container   
   polyLine = new AnnPolylineObject(); 
   polyLine.Points.Add(LeadPointD.Create(1 * inch, 1.2 * inch)); 
   polyLine.Points.Add(LeadPointD.Create(2 * inch, 1.2 * inch)); 
   _automation.Container.Children.Add(polyLine); 
   // Create butt line ending style 
   AnnButtLineEnding buttStyle = new AnnButtLineEnding(); 
   // Set the the created butt style to polyline start and end style 
   polyLine.StartStyle = buttStyle; 
   polyLine.EndStyle = buttStyle; 
 
 
   // Create another polyline object and add it the automation container   
   polyLine = new AnnPolylineObject(); 
   polyLine.Points.Add(LeadPointD.Create(1 * inch, 1.4 * inch)); 
   polyLine.Points.Add(LeadPointD.Create(2 * inch, 1.4 * inch)); 
   _automation.Container.Children.Add(polyLine); 
   // Create slash line ending style 
   AnnSlashLineEnding slashStyle = new AnnSlashLineEnding(); 
   // Set the the created slash style to polyline start and end style 
   polyLine.StartStyle = slashStyle; 
   polyLine.EndStyle = slashStyle; 
 
 
   // Create another polyline object and add it the automation container   
   polyLine = new AnnPolylineObject(); 
   polyLine.Points.Add(LeadPointD.Create(1 * inch, 1.6 * inch)); 
   polyLine.Points.Add(LeadPointD.Create(2 * inch, 1.6 * inch)); 
   _automation.Container.Children.Add(polyLine); 
   // Create square line ending style 
   AnnSquareLineEnding squareStyle = new AnnSquareLineEnding(); 
   // Set the the created square style to polyline start and end style 
   polyLine.StartStyle = squareStyle; 
   polyLine.EndStyle = squareStyle; 
 
 
   // Create another polyline object and add it the automation container   
   polyLine = new AnnPolylineObject(); 
   polyLine.Points.Add(LeadPointD.Create(1 * inch, 1.8 * inch)); 
   polyLine.Points.Add(LeadPointD.Create(2 * inch, 1.8 * inch)); 
   _automation.Container.Children.Add(polyLine); 
   // Create diamond line ending style 
   AnnDiamondLineEnding diamondStyle = new AnnDiamondLineEnding(); 
   // Set the the created diamond style to polyline start and end style 
   polyLine.StartStyle = diamondStyle; 
   polyLine.EndStyle = diamondStyle; 
 
 
   // Create another polyline object and add it the automation container   
   polyLine = new AnnPolylineObject(); 
   polyLine.Points.Add(LeadPointD.Create(1 * inch, 2 * inch)); 
   polyLine.Points.Add(LeadPointD.Create(2 * inch, 2 * inch)); 
   _automation.Container.Children.Add(polyLine); 
   // Create round line ending style 
   AnnRoundLineEnding roundStyle = new AnnRoundLineEnding(); 
   // Set the the created round style to polyline start and end style 
   polyLine.StartStyle = roundStyle; 
   polyLine.EndStyle = roundStyle; 
 
} 
Requirements

Target Platforms

Help Version 22.0.2023.7.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations.Engine Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.