QPx_GetAreaScrollOffset

QPx_GetAreaScrollOffset(areaRef; areaRef; areaRef; areaRef; areaRef):error
areaRef Longint QPix area reference
hScroll Longint Horizontal scroll offset (pixels)
vScroll Longint Vertical scroll offset (pixels)
hMaxScroll Longint Max horz scroll offset (pixels)
vMaxScroll Longint Max vert scroll offset (pixels)
error Longint Error result

Get the scroll offsets of a scrollable QPix plug-in area

The QPix plug-in area is specified by areaRef. If areaRef is not a valid QPix plug-in area reference, qpx_paramErr is returned.

Parameters hScroll and vScroll receive the horizontal and vertical scroll offsets respectively.

Parameters hMaxScroll and vMaxScroll receive the maximum possible offsets for the horizontal and vertical scrollbars.

Example

   // Center image horizontally and vertically

C_LONGINT($error)
C_LONGINT($hScroll;$vScroll;$hMaxScroll;$vMaxScroll)

$error:=QPx_GetAreaScrollOffset (gQPixArea;$hScroll;$vScroll;$hMaxScroll;$vMaxScroll)

If ($error=qpx_noErr)
   
   $hScroll:=$hMaxScroll/2
   $vScroll:=$vMaxScroll/2
   
   $error:=QPx_SetAreaScrollOffset (gQPixArea;$hScroll;$vScroll)
   
End if 

Related commands

QPx_SetAreaScrollOffset Change the scroll offsets of a scrollable QPix plug-in area