Create a unit from pixels and a resolution. Useful for working with images.
Default resolution for screen display is normally 72dpi, though 96dpi is used by GDI+.
ImageShape image = new ImageShape( "image.jpg" ); image.KeepAspectRatio = true; // Calculate width at resolution of 300dpi image.Width = Unit.FromPixels( bitmap.Width, 300 );
Unit Class | TallComponents.PDF Namespace