imageDrawOval

Draws an oval.

imageDrawOval(name, x, y, width, height [, filled]) → returns void

Member Function Syntax

someImage.drawOval(x, y, width, height [, filled])

imageDrawOval Argument Reference

name string
Required

The image on which this operation is performed.

x numeric
Required

The x coordinate of the upper left corner of the oval to draw.

y numeric
Required

The y coordinate of the upper left corner of the oval to draw.

width numeric
Required

The width of the oval to draw.

height numeric
Required

The height of the oval to draw.

filled boolean
Default: false

Specify whether the oval is filled

Examples sample code invoking the imageDrawOval function

This example shows how to draw a green filled oval.

<!--- Use the imageNew function to create a 200x110-pixel image. ---> 
 <cfset myImage=imageNew("",200,110)> 
 <!--- Set the drawing color to green. ---> 
 <cfset imageSetDrawingColor(myImage,"green")> 
 <!--- Turn on antialiasing to improve image quality. ---> 
 <cfset imageSetAntialiasing(myImage,"on")> 
 <!--- Draw a filled green oval on the image. ---> 
 <cfset imageDrawOval(myImage,5,5,190,100,"yes")> 
 <!--- Display the image in a browser. ---> 
 <cfimage source="#myImage#" action="writeToBrowser"> 

CF 11+ Lucee 4.5+ Create a new image and with this image draw a white oval (width=50, height=70) start from (50,40)

imgObj = imageNew("",152,152,"rgb","149c82");
imgObj.drawOval(50,40,50,70,"yes");
cfimage(action="writeToBrowser", source=imgObj);

Fork me on GitHub