Whatever message this page gives is out now! Go check it out!
ImageXORDrawingMode(image, color)Parameter | Description |
image | Required. The ColdFusion image on which this operation is performed. |
color | Required. XOR alternation color:
|
<!--- Use the ImageNew function to create a 300x200-pixel image in RGB format. --->
<cfset myImage = ImageNew("",300,200,"rgb")>
<!--- Turn on antialiasing to improve image quality. --->
<cfset ImageSetAntialiasing(myImage)>
<!--- Set the drawing color to white. --->
<cfset ImageSetDrawingColor(myImage,"white")>
<!--- Draw a white filled rectangle that is the size of the original image. --->
<cfset ImageDrawRect(myImage,0,0,300,200,"yes")>
<!--- Set the XOR drawing mode to white. --->
<cfset ImageXORDrawingMode(myImage,"white")>
<!--- Set the drawing color to red. --->
<cfset ImageSetDrawingColor(myImage,"red")>
<!--- Draw a filled red rectangle. --->
<cfset ImageDrawRect(myImage,50,50,150,100,"yes")>
<!--- Translate the drawing axis to (25,25). --->
<cfset ImageTranslateDrawingAxis(myImage,25,25)>
<!--- Set the drawing color to blue. --->
<cfset ImageSetDrawingColor(myImage,"blue")>
<!--- Draw a blue filled rectangle at the offset location. --->
<cfset ImageDrawRect(myImage,50,50,150,100,"yes")>
<!--- Save the ColdFusion image as a PNG file. --->
<cfset ImageWrite(myImage,"xortest.png")>
<!--- Display the PNG file.--->
<img src="xortest.png">