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.
GpiSetCharShear (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPIPRIMITIVES
 
BOOL GpiSetCharShear(hps, pptlShear)
HPS hps;              /* presentation-space handle             */
PPOINTL pptlShear;    /* address of structure with shear angle */
 
The GpiSetCharShear function sets the character-shear attribute. The
character shear specifies how much to shear (tilt) characters from their
normal vertical orientation. The function uses the coordinates of the point
specified by pptlShear as the end point of a line originating at (0,0). The
vertical strokes in subsequent character strings are drawn parallel to the
line. The top of the character box remains parallel to the character
baseline.
 
The system draws upright characters if pptlShear specifies the point (0,1).
This is the default character-shear attribute. If coordinates in the point
are both positive or both negative, the characters slope from bottom-left to
top-right. If the coordinates have opposite signs (one is positive and one
is negative), the characters slope from top-left to bottom-right. Zero
should not be used for the y-coordinate since it implies an infinite shear.
However, if both coordinates are zero, the attribute is set to the default
value.
 
If the attribute mode is AM_PRESERVE, the function saves the previous
character-shear attribute on the attribute stack when it sets the new
character shear. The previous character-shear attribute can be retrieved by
using the GpiPop function.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hps        Identifies the presentation space.
 
pptlShear  Points to a POINTL structure that contains a point that defines
           the character shear.
 
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_CHAR_SHEAR_ATTR
     PMERR_INV_COORDINATE
     PMERR_INV_HPS
     PMERR_PS_BUSY
 
See Also
 
GpiQueryCharShear, GpiSetAttrMode, GpiSetAttrs, POINTL