Initializes a new instance of the CADImageEnt class.
Namespace:
CADImport
Assembly: CADImport (in CADImport.dll)
Assembly: CADImport (in CADImport.dll)
<p>Creating a new CADImageEnt object example:</p>
<p>[C#]</p>
CreateNewImage(); Point p1 = new Point(100, 100); Point p2 = new Point(300, 300); Rectangle r1 = CADConst.SetNewRect(p1, p2); DPoint pt1 = GetRealPoint(r1.X, r1.Y); DPoint pt2 = GetRealPoint(r1.Right, r1.Bottom); CADImageEnt imgEnt = new CADImageEnt(); string path = @"http://www.cadsofttools.com/en/templates/moveax/images/01.gif"; Bitmap bmpTmp = null; Stream tmpStream; try { tmpStream = CADConst.LoadDataFromWeb(path); bmpTmp = new Bitmap(tmpStream); tmpStream.Close(); } catch { //error load file from web return; } imgEnt.SetImage(bmpTmp); imgEnt.Color = CADConst.clNone; imgEnt.Point = new DPoint(pt1.X, pt1.Y, 0); imgEnt.Point1 = new DPoint(Math.Abs(pt2.X - pt1.X), -Math.Abs(pt2.Y - pt1.Y), 0); imgEnt.Point2 = new DPoint(1.0, 1.0, 0.0); imgEnt.Point3 = new DPoint(1.0, 1.0, 0.0); imgEnt.Rotate = 0.0; imgEnt.LineWeight = 0.1; imgEnt.Layer = (CADLayer)cadImage.Converter.Layers[0]; imgEnt.Loaded(cadImage.Converter); imgEnt.Point2 = new DPoint(0.0, 0.0, 0.0); imgEnt.Rotate = 0.0; imgEnt.Handle = imgEnt.GetHashCode(); imgEnt.KeyEnt = imgEnt.Handle.ToString(); cadImage.Converter.OnCreate(imgEnt); cadImage.CurrentLayout.Entities.Add(imgEnt); EditorCADPictureBox.Invalidate();
Windows NT 4.0, Windows 98, Windows XP, Windows Server 2003, Windows Vista; Windows Server 2008 R2, Windows 7, WIndows10
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.