Skip to main content
Inspiring
September 22, 2009
Answered

CF 8 cfimage => ImageDrawRoundRect is not drawing corner arcs ?

  • September 22, 2009
  • 1 reply
  • 897 views

Hello,

I am having an issue with the ImageDrawRoundRect function on two CF 8 servers.   They draw the

rectangles, but they do not round the corners ??   I am using the example from Adobe, and the results

is just a blue rectangle.   I do not know where to go from here, is it a java version, jquery ?   Where

to look.   Any help would be appreciated, as I am at a loss what to look for with this issue.    Server

info. follows.

Thanks, Bob

<!--- This example shows how to draw a square with rounded corners. --->
<!--- Create a 200x200-pixel image. --->
<cfset myImage=ImageNew("",200,200)>
<!--- Set the drawing color for the image to blue. --->
<cfset ImageSetDrawingColor(myImage,"blue")>
<!--- Turn on antialiasing to improve image quality. --->
<cfset ImageSetAntialiasing(myImage,"on")>
<!--- Draw a blue filled square with round corners of arcWidth=10 and arcHeight=2. --->
<cfset ImageDrawRoundRect(myImage,5,5,190,190,"yes",10,2)>
<!--- Display the image in a browser. --->
<cfimage source="#myImage#" action="writeToBrowser">

Server Product  ColdFusion 
Version  8,0,0,176276   
Edition  Enterprise   
Operating System  UNIX   
OS Version  2.6.18-128.el5PAE   
Java Version  1.6.0_01   
Java File Encoding  UTF8   
Java Default Locale  en_US   
Java VM Specification Version  1.0   
Java VM Specification Vendor  Sun Microsystems Inc.   
Java VM Specification Name  Java Virtual Machine Specification   
Java VM Version  1.6.0_01-b06   
Java VM Vendor  Sun Microsystems Inc.   
Java VM Name  Java HotSpot(TM) Server VM   
Java Specification Version  1.6   
Java Specification Vendor  Sun Microsystems Inc.   
Java Specification Name  Java Platform API Specification   
Java Class Version  50.0   
Java Class Path  CF Classpath

    This topic has been closed for replies.
    Correct answer Adam Cameron.

    You might want to take a closer look at the order the docs say the arguments should be listed, compared to the way they are used in the sample code.

    Note: the second example does it correctly.

    --

    Adam

    1 reply

    Adam Cameron.Correct answer
    Inspiring
    September 23, 2009

    You might want to take a closer look at the order the docs say the arguments should be listed, compared to the way they are used in the sample code.

    Note: the second example does it correctly.

    --

    Adam

    macslayerAuthor
    Inspiring
    September 23, 2009

    Uggghhh..  Thanks for spotting that.   I guess assuming example one works, is uhhh, incorrect.    Appreciate

    your response, on the money !!   Now to see if hot fix c3 breaks things..  :)

    Inspiring
    September 23, 2009

    NP.  It bamboozled me for a while too, because I made the same assumptions about the accuracy of the docs as you did.  Wouldn't it be nice if they tested their code before publishing it?

    It might be useful for you to bring this to Adobe's attention: http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#.

    --

    Adam