QPix Command Reference Image Area |

### QPx_GetAreaScrollOffset

QPx_GetAreaScrollOffset(areaRef; hScroll; vScroll; hMaxScroll; vMaxScroll):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

Returns 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 | Changes the scroll offsets of a scrollable QPix plug-in area

QPix © Escape Information Services
Generated by QDoc 2.6 on Thu, 2 May 2002 00:49:56 +0300