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

The image on which this operation is performed.

x numeric

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

y numeric

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

width numeric

The width of the oval to draw.

height numeric

The height of the oval to draw.

filled boolean
Default: false

Specify whether the oval is filled

Examples sample code invoking the imageDrawOval function

Tag Syntax

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"> 

Using drawOval member function

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");
cfimage(action="writeToBrowser", source=imgObj);

Fork me on GitHub