Shears the drawing canvas.
Nothing.
ImageShearDrawingAxis(name
,shx
,shy
)
ImageRotateDrawingAxis, ImageSetAntialiasing, ImageShear, IsImageFile
ColdFusion 8: Added this function.
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. |
For each pixel (x,y) of the destination, the source value at the fractional subpixel position (x',y') is constructed by means of 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.
<!--- Create a ColdFusion image from an existing JPEG file. ---> <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">