Whatever message this page gives is out now! Go check it out!

ImageShearDrawingAxis

Last update:
May 18, 2026

Description

Shears the drawing canvas.

Returns

Nothing.

Category

Function syntax

ImageShearDrawingAxis(name, shx, shy)

See also

History

ColdFusion 8: Added this function.

Parameters

Parameter
Description
name
Required. The ColdFusion image on which this operation is performed.
shx
Required. The multiplier by which coordinates are shifted in the positive x axis direction as a function of the y coordinate.
shy
Required. the multiplier by which coordinates are shifted in the positive y axis direction as a function of the x coordinate.

Usage

For each pixel (x,y) of the destination, the source value at the fractional subpixel position (x',y') is constructed with an interpolation object and written to the destination.If the direction parameter is equal to horizontal, x' = (x - y*shear) and y' = y. If the direction parameter is equal to vertical, x' = x and y' = (y - x*shear).Use the ImageSetAntialiasing function to improve the quality of the rendered image.

Example

<cfimage source="../cfdocs/images/artgallery/paul03.jpg" name="myImage">
<!--- Turn on antialiasing to improve image quality. --->
<cfset ImageSetAntialiasing(myImage,"on")>
<!--- Set the shear drawing axis. --->
<cfset ImageShearDrawingAxis(myImage,0.5,0.5)>
<!--- Draw a rectangle on the image with the shear settings. --->
<cfset ImageDrawRect(myImage,50,50,50,50)>
<!--- Display the image in a browser. --->
<cfimage source="#myImage#" action="writeToBrowser">

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page