Returns the size of a text with a AnnFont and clipping size.
public static Leadtools.LeadSizeD GetTextSize(string text,Leadtools.Annotations.Core.AnnFont font,Leadtools.LeadSizeD layoutArea)
Public Shared Function GetTextSize( _ByVal text As String, _ByVal font As Leadtools.Annotations.Core.AnnFont, _ByVal layoutArea As Leadtools.LeadSizeD _) As Leadtools.LeadSizeD
text
The source text string
font
The font to use
layoutArea
Clipping size to use.
The size of the text.
using Leadtools.Annotations.Automation;using Leadtools.Annotations.Core;using Leadtools.Annotations.Rendering;using Leadtools.Codecs;using Leadtools.Annotations.WinForms;public void AnnRenderingEngine_GetTextSize(){double inch = 720.0;// Get the containerAnnContainer container = _automation.Container;// Create a new AnnTextObjectAnnTextObject txtObject = new AnnTextObject();txtObject.Rect = LeadRectD.Create(3 * inch, 3 * inch, 1 * inch, 1 * inch);txtObject.Stroke = AnnStroke.Create(AnnSolidColorBrush.Create("Blue"), LeadLengthD.Create(1));txtObject.Text = "LEADTOOLS";container.Children.Add(txtObject);// Measure the size of a text stringLeadSizeD size = AnnWinFormsRenderingEngine.GetTextSize(txtObject.Text, txtObject.Font, txtObject.Bounds.Size);Debug.WriteLine(size.ToString());}
|
Products |
Support |
Feedback: GetTextSize Method (AnnWinFormsRenderingEngine) - Leadtools.Annotations.Rendering |
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.