Gets or sets a value corresponding to amount of millimeters per one pixel.

Namespace: CADImport
Assembly: CADImport (in CADImport.dll)

Public Property MMToPixelX() As Double
This language is not supported or no code example is available.
public double MMToPixelX {get; set;}
This language is not supported or no code example is available.
<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, Windows11

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0 - 4; NET6

.NET Framework Client Profile

Supported in: 4, 3.5 SP1