Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.5.2
|
Leadtools.Annotations Namespace > AnnObject Class : NameOffset Property |
public virtual AnnPoint NameOffset {get; set;}
'Declaration Public Overridable Property NameOffset As AnnPoint
'Usage Dim instance As AnnObject Dim value As AnnPoint instance.NameOffset = value value = instance.NameOffset
This example sets the names of all objects in a container to be visible, at the upper-left corner of the image, and to have white text over a blue background with an Arial 11-point font.
Imports Leadtools Imports Leadtools.Annotations Imports Leadtools.Codecs Imports Leadtools.WinForms Imports Leadtools.Drawing Public Sub AnnObject_NameOffset(ByVal container As AnnContainer) Dim font As AnnFont = New AnnFont("Arial", New AnnLength(11, AnnUnit.Point), FontStyle.Regular) For Each obj As AnnObject In container.Objects obj.NameVisible = True obj.NameOffset = AnnPoint.Empty obj.NameForeColor = Color.White obj.NameBackColor = Color.Blue obj.NameFont = font Next obj End Sub
using Leadtools; using Leadtools.Annotations; using Leadtools.Codecs; using Leadtools.WinForms; using Leadtools.Drawing; public void AnnObject_NameOffset(AnnContainer container) { AnnFont font = new AnnFont("Arial", new AnnLength(11, AnnUnit.Point), FontStyle.Regular); foreach(AnnObject obj in container.Objects) { obj.NameVisible = true; obj.NameOffset = AnnPoint.Empty; obj.NameForeColor = Color.White; obj.NameBackColor = Color.Blue; obj.NameFont = font; } }