←Select platform

AnnButtLineEnding Class

Summary

Defines an AnnButtLineEnding style.

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

The AnnButtLineEnding represents the ending style as a short line perpendicular to the line itself with a specific length that can be set using AnnLineEnding.Length property. This ending style does not support fill.

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 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 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.