int UnsafeNativeMethods.IOleControlSite.TransformCoords(NativeMethods.POINT pPtlHimetric, NativeMethods.POINTF pPtfContainer, int dwFlags) { if ((dwFlags & NativeMethods.XFORMCOORDS_HIMETRICTOCONTAINER) != 0) { if ((dwFlags & NativeMethods.XFORMCOORDS_SIZE) != 0) { pPtfContainer.x = (float)ActiveXHelper.HM2Pix(pPtlHimetric.x, ActiveXHelper.LogPixelsX); pPtfContainer.y = (float)ActiveXHelper.HM2Pix(pPtlHimetric.y, ActiveXHelper.LogPixelsY); } else if ((dwFlags & NativeMethods.XFORMCOORDS_POSITION) != 0) { pPtfContainer.x = (float)ActiveXHelper.HM2Pix(pPtlHimetric.x, ActiveXHelper.LogPixelsX); pPtfContainer.y = (float)ActiveXHelper.HM2Pix(pPtlHimetric.y, ActiveXHelper.LogPixelsY); } else { return(NativeMethods.E_INVALIDARG); } } else if ((dwFlags & NativeMethods.XFORMCOORDS_CONTAINERTOHIMETRIC) != 0) { if ((dwFlags & NativeMethods.XFORMCOORDS_SIZE) != 0) { pPtlHimetric.x = ActiveXHelper.Pix2HM((int)pPtfContainer.x, ActiveXHelper.LogPixelsX); pPtlHimetric.y = ActiveXHelper.Pix2HM((int)pPtfContainer.y, ActiveXHelper.LogPixelsY); } else if ((dwFlags & NativeMethods.XFORMCOORDS_POSITION) != 0) { pPtlHimetric.x = ActiveXHelper.Pix2HM((int)pPtfContainer.x, ActiveXHelper.LogPixelsX); pPtlHimetric.y = ActiveXHelper.Pix2HM((int)pPtfContainer.y, ActiveXHelper.LogPixelsY); } else { return(NativeMethods.E_INVALIDARG); } } else { return(NativeMethods.E_INVALIDARG); } return(NativeMethods.S_OK); }
// Token: 0x06007772 RID: 30578 RVA: 0x00221A84 File Offset: 0x0021FC84 int UnsafeNativeMethods.IOleControlSite.TransformCoords(NativeMethods.POINT pPtlHimetric, NativeMethods.POINTF pPtfContainer, int dwFlags) { if ((dwFlags & 4) != 0) { if ((dwFlags & 2) != 0) { pPtfContainer.x = (float)ActiveXHelper.HM2Pix(pPtlHimetric.x, ActiveXHelper.LogPixelsX); pPtfContainer.y = (float)ActiveXHelper.HM2Pix(pPtlHimetric.y, ActiveXHelper.LogPixelsY); } else { if ((dwFlags & 1) == 0) { return(-2147024809); } pPtfContainer.x = (float)ActiveXHelper.HM2Pix(pPtlHimetric.x, ActiveXHelper.LogPixelsX); pPtfContainer.y = (float)ActiveXHelper.HM2Pix(pPtlHimetric.y, ActiveXHelper.LogPixelsY); } } else { if ((dwFlags & 8) == 0) { return(-2147024809); } if ((dwFlags & 2) != 0) { pPtlHimetric.x = ActiveXHelper.Pix2HM((int)pPtfContainer.x, ActiveXHelper.LogPixelsX); pPtlHimetric.y = ActiveXHelper.Pix2HM((int)pPtfContainer.y, ActiveXHelper.LogPixelsY); } else { if ((dwFlags & 1) == 0) { return(-2147024809); } pPtlHimetric.x = ActiveXHelper.Pix2HM((int)pPtfContainer.x, ActiveXHelper.LogPixelsX); pPtlHimetric.y = ActiveXHelper.Pix2HM((int)pPtfContainer.y, ActiveXHelper.LogPixelsY); } } return(0); }