Defines a diamond-shape ending style.
public class AnnDiamondLineEnding : AnnSquareLineEnding
public:
ref class AnnDiamondLineEnding : AnnSquareLineEnding
class AnnDiamondLineEnding(AnnSquareLineEnding):
Remarks The AnnDiamondLineEnding style represents the ending style as diamond shape. The AnnDiamondLineEnding class inherits a number of properties from the AnnLineEnding class, providing support for fill, stroke and length characteristics.
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;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document