public bool Polyline(HDC hDC, uint ppts, nint nCount) { var pts = new Win32.POINT[nCount]; for (int i = 0; i < nCount; i++) { pts[i] = _machine.ReadStruct <Win16.POINT>((uint)(ppts + i * Marshal.SizeOf <Win16.POINT>())).Convert(); } return(Polyline(hDC, pts, nCount)); }
public bool LPtoDP(HDC hDC, uint ppts, nint nCount) { // Convert to 32 var pts = new Win32.POINT[nCount]; for (int i = 0; i < nCount; i++) { pts[i] = _machine.ReadStruct <Win16.POINT>((uint)(ppts + i * Marshal.SizeOf <Win16.POINT>())).Convert(); } // Calculate bool val = LPtoDP(hDC.value, pts, nCount); // And back for (int i = 0; i < nCount; i++) { _machine.WriteStruct((uint)(ppts + i * Marshal.SizeOf <Win16.POINT>()), pts[i].Convert()); } return(val); }
public static Win16.POINT To16(Win32.POINT pt32) { return(pt32.Convert()); }
public static extern bool SetViewportOrgEx(HDC hDC, int x, int y, out Win32.POINT pptOld);
public static extern bool SetBrushOrgEx(HDC hDC, int x, int y, out Win32.POINT pptOld);
public static extern bool GetDCOrgEx(HDC hDC, out Win32.POINT pptOld);
public static extern bool GetCurrentPositionEx(HDC hdc, out Win32.POINT lpPoint);