diff --git a/rtl/win16/win31.pp b/rtl/win16/win31.pp index ea52e2bb8e..381bbe4229 100644 --- a/rtl/win16/win31.pp +++ b/rtl/win16/win31.pp @@ -235,6 +235,25 @@ function SetBoundsRect(hDC: HDC; const lprcBounds: RECT; flags: UINT): UINT; ext function GetBoundsRect(hDC: HDC; var lprcBounds: RECT; flags: UINT): UINT; external 'GDI'; {$endif} +{ Coordinate transformation support } +function SetWindowOrgEx(hdc: HDC; nX, nY: SmallInt; lpPoint: LPPOINT): BOOL; external 'GDI'; +function GetWindowOrgEx(hdc: HDC; lpPoint: LPPOINT): BOOL; external 'GDI'; + +function SetWindowExtEx(hdc: HDC; nX, nY: SmallInt; lpSize: LPSIZE): BOOL; external 'GDI'; +function GetWindowExtEx(hdc: HDC; lpSize: LPSIZE): BOOL; external 'GDI'; + +function OffsetWindowOrgEx(hdc: HDC; nX, nY: SmallInt; lpPoint: LPPOINT): BOOL; external 'GDI'; +function ScaleWindowExtEx(hdc: HDC; nXnum, nXdenom, nYnum, nYdenom: SmallInt; lpSize: LPSIZE): BOOL; external 'GDI'; + +function SetViewportExtEx(hdc: HDC; nX, nY: SmallInt; lpSize: LPSIZE): BOOL; external 'GDI'; +function GetViewportExtEx(hdc: HDC; lpSize: LPSIZE): BOOL; external 'GDI'; + +function SetViewportOrgEx(hdc: HDC; nX, nY: SmallInt; lpPoint: LPPOINT): BOOL; external 'GDI'; +function GetViewportOrgEx(hdc: HDC; lpPoint: LPPOINT): BOOL; external 'GDI'; + +function OffsetViewportOrgEx(hdc: HDC; nX, nY: SmallInt; lpPoint: LPPOINT): BOOL; external 'GDI'; +function ScaleViewportExtEx(hdc: HDC; nXnum, nXdenom, nYnum, nYdenom: SmallInt; lpSize: LPSIZE): BOOL; external 'GDI'; + implementation end. diff --git a/rtl/win16/winprocsh.inc b/rtl/win16/winprocsh.inc index d71a5d5444..e7c78ac477 100644 --- a/rtl/win16/winprocsh.inc +++ b/rtl/win16/winprocsh.inc @@ -310,3 +310,33 @@ function MulDiv(nMultiplicand, nMultiplier, nDivisor: SmallInt): SmallInt; exter { Device Capabilities } function GetDeviceCaps(hdc: HDC; iCapability: SmallInt): SmallInt; external 'GDI'; + +{ Coordinate transformation support } + +function SetMapMode(hdc: HDC; fnMapMode: SmallInt): SmallInt; external 'GDI'; +function GetMapMode(hdc: HDC): SmallInt; external 'GDI'; + +function SetWindowOrg(hdc: HDC; nXOrigin, nYOrigin: SmallInt): DWORD; external 'GDI'; +function GetWindowOrg(hdc: HDC): DWORD; external 'GDI'; + +function SetWindowExt(hdc: HDC; nXExtent, nYExtent: SmallInt): DWORD; external 'GDI'; +function GetWindowExt(hdc: HDC): DWORD; external 'GDI'; + +function OffsetWindowOrg(hdc: HDC; nXOffset, nYOffset: SmallInt): DWORD; external 'GDI'; +function ScaleWindowExt(hdc: HDC; nXNum, nXDenom, nYNum, nYDenom: SmallInt): DWORD; external 'GDI'; + +function SetViewportOrg(hdc: HDC; nXOrigin, nYOrigin: SmallInt): DWORD; external 'GDI'; +function GetViewportOrg(hdc: HDC): DWORD; external 'GDI'; + +function SetViewportExt(hdc: HDC; nXExtent, nYExtent: SmallInt): DWORD; external 'GDI'; +function GetViewportExt(hdc: HDC): DWORD; external 'GDI'; + +function OffsetViewportOrg(hdc: HDC; nXOffset, nYOffset: SmallInt): DWORD; external 'GDI'; +function ScaleViewportExt(hdc: HDC; nXNum, nXDenom, nYNum, nYDenom: SmallInt): DWORD; external 'GDI'; + +function DPtoLP(hdc: HDC; lppt: LPPOINT; cPoints: SmallInt): BOOL; external 'GDI'; +function LPtoDP(hdc: HDC; lppt: LPPOINT; cPoints: SmallInt): BOOL; external 'GDI'; +{$ifdef VAR_PARAMS_ARE_FAR} +function DPtoLP(hdc: HDC; var pt; cPoints: SmallInt): BOOL; external 'GDI'; +function LPtoDP(hdc: HDC; var pt; cPoints: SmallInt): BOOL; external 'GDI'; +{$endif} diff --git a/rtl/win16/wintypes.inc b/rtl/win16/wintypes.inc index b4a4aaa89c..f61b0b4ea2 100644 --- a/rtl/win16/wintypes.inc +++ b/rtl/win16/wintypes.inc @@ -485,3 +485,19 @@ const RC_STRETCHDIB = $2000; RC_OP_DX_OUTPUT = $4000; RC_DEVBITS = $8000; + +{ Coordinate transformation support } + +{ Map modes } + MM_TEXT = 1; + MM_LOMETRIC = 2; + MM_HIMETRIC = 3; + MM_LOENGLISH = 4; + MM_HIENGLISH = 5; + MM_TWIPS = 6; + MM_ISOTROPIC = 7; + MM_ANISOTROPIC = 8; + +{ Coordinate Modes } + ABSOLUTE = 1; + RELATIVE = 2;