// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== global proc int convertInchesToPixels( float $valueInInches, float $dotsPerInch) // // Description: // Calculate the pixel value corresponding to a given // measurement size (must be in inches) // and pixel density (must be in DPI). // { int $result = `floor( $valueInInches * $dotsPerInch + 0.5 )`; return $result; }