Initializes a new instance of the
CADText object.
Namespace:
CADImport
Assembly: CADImport (in CADImport.dll)
Syntax
Visual Basic (Declaration) |
Public Sub New() |
Example
<p>Creating a new
CADText object example:</p>
<p>
[C#]
</p>
| Copy Code |
---|
CreateNewImage();
Point p1 = new Point(100, 100);
CADText text = new CADText();
text.FontName = "Txt.shx";
text.Color = CADConst.clNone;
text.Point = GetRealPoint(p1.X, p1.Y);
text.Height = 5.0;
text.Rotation = 0.0f;
text.Text = "Any text";
text.LineWeight = 0.1;
text.Layer = cadImage.Converter.Layers[0] as CADLayer;
cadImage.Converter.OnCreate(text);
text.Handle = text.GetHashCode();
text.KeyEnt = text.Handle.ToString();
cadImage.Converter.OnCreate(text);
cadImage.CurrentLayout.Entities.Add(text);
EditorCADPictureBox.Invalidate();
|
Platforms
Version Information
.NET Framework
Supported in: 2.0 - 4, NET6
.NET Framework Client Profile
Supported in: 4, 3.5 SP1
See Also