gpi12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
GpiSetPatternRefPoint (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPIPRIMITIVES
 
BOOL GpiSetPatternRefPoint(hps, pptlRef)
HPS hps;            /* presentation-space handle                 */
PPOINTL pptlRef;    /* address of structure with reference point */
 
The GpiSetPatternRefPoint function sets the current pattern reference point
to the specified value. The pattern reference point is the point to which
the origin of the fill pattern maps. The pattern reference point does need
not be inside the actual area to be filled. The default pattern reference
point is (0,0).
 
If the attribute mode is AM_PRESERVE, the function saves the previous
pattern reference point on the attribute stack when it sets the new
reference point. The previous pattern reference point can be retrieved using
the GpiPop function.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hps        Identifies the presentation space.
 
pptlRef    Points to the POINTL structure that contains the pattern
           reference point in world coordinates.
 
Return Value
 
The return value is GPI_OK if the function is successful or GPI_ERROR if an
error occurred.
 
Errors
 
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
 
     PMERR_INV_COORDINATE
     PMERR_INV_HPS
     PMERR_INV_PATTERN_REF_PT_ATTR
     PMERR_PS_BUSY
 
Comments
 
The pattern reference point is subject to all transformations. This means
that moving an area by using a transformation also moves the fill pattern so
that the pattern keeps its position relative to the area boundaries. This
allows part of a picture to be moved using the GpiBitBlt function, and the
remainder is drawn without discontinuity by changing the appropriate
transformation.
 
See Also
 
GpiBitBlt, GpiQueryPatternRefPoint, GpiSetAttrMode, GpiSetPattern,
GpiSetPatternSet, POINTL