public AnnFont Font { get; set; }
@property (nonatomic, strong, nullable) LTAnnFont *font;
public AnnFont getFont()
public void setFont(AnnFont font)
Font # get and set (AnnObject)
The AnnFont used to draw this AnnObject. The default value is "Arial" 12pt size.
This property should be used as the font properties used when drawing the text of this object. Each object renderer is responsible for determining whether to use this property. For example, the renderer for AnnTextObject will use this property to create a device font and use it to draw its Text string. Setting Font to null will stop the object from rendering its text.
using Leadtools.Annotations.Automation;
using Leadtools.Annotations.Engine;
using Leadtools.Codecs;
using Leadtools.Annotations;
using Leadtools.Annotations.WinForms;
public void AnnCore_AnnTextObject()
{
// assumes _automation is valid
double inch = 720.0;
// Add a text object
AnnTextObject textObj = new AnnTextObject();
// Set the points for the hotspot
textObj.Points.Add(LeadPointD.Create(1 * inch, 1 * inch));
textObj.Points.Add(LeadPointD.Create(2 * inch, 1 * inch));
textObj.Points.Add(LeadPointD.Create(2 * inch, 2 * inch));
textObj.Points.Add(LeadPointD.Create(1 * inch, 2 * inch));
// Set the text
textObj.Text = "sample text for object\nsecond line of text\nlast line";
// Add the object to the automation container
// Set the font size
textObj.Font.FontSize = 16;
_automation.Container.Children.Add(textObj);
}
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