ImageGear for C and C++ on Windows v19.6 - Updated
IG_FX_shear
API Reference Guide > Core Component API Reference > Core Component Functions Reference > FX Functions > IG_FX_shear

This function applies a shearing effect to an image, moving the image rasters or columns according to the specified offsets.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_FX_shear(
        HIGEAR  hIGear, 
        AT_DOUBLE* curvePoints, 
        AT_INT   pointCount, 
        enumIGIPShearFillStyle fillStyle,   
        AT_BOOL interpolate, 
        AT_BOOL vertical,
        HIGPIXEL hbkColor
);

Arguments:

Name Type Description
hIGear HIGEAR Image to which to apply shear effect.
curvePoints AT_DOUBLE* The array of offsets to move the image by. Every offset is in the range -1 to 1. Negative values shift the raster/column to the left, while positive values shift it to the right. The number of offsets is equal to the image width or height depending on the direction of movement (horizontal or vertical).
pointCount AT_INT Specifies curvePoints array length.
fillStyle enumIGIPShearFillStyle Specifies how the empty image area is filled.
interpolate AT_BOOL If TRUE, interpolation is used to smooth shifted pixel values.
vertical AT_BOOL If TRUE, the direction of motion is vertical. Otherwise, the direction is horizontal.
hbkColor HIGPIXEL Background color to use for filling empty image area. Only used if the specified fill style uses a fill color. It should have the same color space and channel depths as the image to which the effect is applied.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Sample:

Image Processing

Remarks:

The fillStyle parameter can be set to one of the following values:

Name Description
IG_IP_SHEAR_FILLCOLOR Empty area is filled with the specified color.
IG_IP_SHEAR_NOCHANGE Empty area remains unchanged.
IG_IP_SHEAR_REPEATEDGE Empty area is filled with the first or last raster color.
IG_IP_SHEAR_REPEATRASTER The raster is repeated periodically across the empty area.