// Special Coordinate Functions (useful for dealing with metafiles and OLE)
//#define HIMETRIC_INCH   2540    // HIMETRIC units per inch

Special Coordinate Functions (useful for dealing with metafiles and OLE)
Special Coordinate Functions ( useful for dealing with metafiles and OLE )
pub fn DPtoHIMETRIC(&self,lpSize: LPSIZE) {
		self.assert_dc();
		let nMapMode = self.GetMapMode() as c_uint;
		if (nMapMode < MM_ISOTROPIC) && (nMapMode != MM_TEXT) {
		//if((nMapMode = GetMapMode()) < MM_ISOTROPIC && nMapMode != MM_TEXT)
			// when using a constrained map mode, map against physical inch
			//((CDCHandle*)this)->SetMapMode(MM_HIMETRIC);
			self.SetMapMode(MM_HIMETRIC as c_int);
			self.DPtoLP_Size(lpSize);
			// why use this convertion below?
			//((CDCHandle*)this)->SetMapMode(nMapMode);
			self.SetMapMode(nMapMode as c_int);
		}
		else {
			// map against logical inch for non-constrained mapping modes
			let cxPerInch = self.GetDeviceCaps(LOGPIXELSX);
			let cyPerInch = self.GetDeviceCaps(LOGPIXELSY);
			debug_assert!(cxPerInch != 0 && cyPerInch != 0);
			unsafe{
				let p = &mut *lpSize;
				p.cx = um::winbase::MulDiv(p.cx, HIMETRIC_INCH, cxPerInch);
				p.cy = um::winbase::MulDiv(p.cy, HIMETRIC_INCH, cyPerInch);
			}
		}
	}
pub fn DPtoHIMETRIC ( & self , lpSize : LPSIZE ) { self . assert_dc ( ) ; let nMapMode = self . GetMapMode ( ) as c_uint ; if ( nMapMode < MM_ISOTROPIC ) && ( nMapMode != MM_TEXT ) { //if((nMapMode = GetMapMode()) < MM_ISOTROPIC && nMapMode != MM_TEXT)
 // when using a constrained map mode, map against physical inch
 //((CDCHandle*)this)->SetMapMode(MM_HIMETRIC);
 self . SetMapMode ( MM_HIMETRIC as c_int ) ; self . DPtoLP_Size ( lpSize ) ; // why use this convertion below?
 //((CDCHandle*)this)->SetMapMode(nMapMode);
 self . SetMapMode ( nMapMode as c_int ) ; } else { // map against logical inch for non-constrained mapping modes
 let cxPerInch = self . GetDeviceCaps ( LOGPIXELSX ) ; let cyPerInch = self . GetDeviceCaps ( LOGPIXELSY ) ; debug_assert ! ( cxPerInch 0 cyPerInch 0 ) ; unsafe { let p = & mut * lpSize ; p . cx = um :: winbase :: MulDiv ( p . cx , HIMETRIC_INCH , cxPerInch ) ; p . cy = um :: winbase :: MulDiv ( p . cy , HIMETRIC_INCH , cyPerInch ) ; } } }
Special Coordinate Functions (useful for dealing with metafiles and OLE)
Special Coordinate Functions ( useful for dealing with metafiles and OLE )
&self
lpSize
LPSIZE
define himetric_inch   2540    // himetric units per inch

None