Gets or sets a value corresponding to amount of millimeters per one pixel.
Namespace:
CADImport
Assembly: CADImport (in CADImport.dll)
Assembly: CADImport (in CADImport.dll)
<p>Example use MMToPixelX:</p>
<p>[C#]</p>
public void SaveRealSizeImage(Control drawingControl) { Stream str = File.OpenRead(@".\test.dwg"); CADImage cadImage = new CADImport.DWG.DWGImage(); cadImage.LoadFromStream(str); str.Close(); DRect tmpRect = new DRect(0, 0, 1, 1); cadImage.SetNewMMToPixel(drawingControl.CreateGraphics()); double realScaleDouble = this.cadImage.AbsWidth / this.cadImage.MMToPixelX; tmpRect.Width = tmpRect.Width * realScaleDouble; tmpRect.Height = tmpRect.Height * realScaleDouble; this.cadImage.SaveToFile(@"result.jpg", ImageFormat.Jpeg, tmpRect); }
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.