Пример #1
0
        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));
        }
Пример #2
0
        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);
        }
Пример #3
0
 public static Win16.POINT To16(Win32.POINT pt32)
 {
     return(pt32.Convert());
 }
Пример #4
0
 public static extern bool SetViewportOrgEx(HDC hDC, int x, int y, out Win32.POINT pptOld);
Пример #5
0
 public static extern bool SetBrushOrgEx(HDC hDC, int x, int y, out Win32.POINT pptOld);
Пример #6
0
 public static extern bool GetDCOrgEx(HDC hDC, out Win32.POINT pptOld);
Пример #7
0
 public static extern bool GetCurrentPositionEx(HDC hdc, out Win32.POINT lpPoint);