Rounded Corners Code

A while back I mentioned that I had come up with some code to do rounded borders, but that I was holding it back as part of a larger release. Since then, I've not gotten as far with some of my other code ideas, and since I was asked nicely, I figured I'd release the code for rounded corners.

 

Image Object

Perhaps I've been overwhelmed by my recent reading on object-oriented design, but as I said in my last post, I thought an object that offered all the CF8 Image functions as methods of that object would be kind of nice. Despite the stumbling block of not being able to use onMissingMethod and Evaluate to create a solution, I applied a little brute force and hand coded it all. You can download it here:

Image.cfc

Version 0.3
  • Corrected for ImageDrawQuardicCurve() documentation errors (takes 7, not 9 as listed here).
  • Added masks to allow Yes/No and On/Off inputs to be passed as simple boolean values (true/false)

I've tested the basics, but I wont guarantee that it is completely bug free. When I find additional bugs, I'll put out new versions. I'll also be using this object as the bases for a new EffectsImage.cfc that will hold things like the mirroring effect.

 

Evaluate()'ing a Function with "Nothing" Returned

So, I'm plugging away at some cool image effect stuff, and I decided that it would be nice to wrap all my image functionality into an object, and that it would be cool to try CF8's new onMissingMethod function to implement the built in function set as methods of this new object. The overall effect would be really nifty and fun to use, but I hit a big old snag; the Evaluate() function fails with "nothing" returned.

 

CF is not for Cookies

While ColdFusion uses cookies in some sophisticated ways (tracking sessions and what not), I found out today that because CF is case insensitive, it is inept at tracking cookies in certain situations.

 

Could not generate stub objects for web service invocation.

God to I hate this message. There are a 1,001 questions about the cause of this message on the CF 6.1 livedocs for the tag, and none of them have the right answer for my situation. Whats more, I can't find anyone who does have a good solution for CF 7.0 or any version. Click more to read my tale of woe.

 

Transparent Background

One of the big frustrations about CF8 image effects, is the lack of any way to get transparent writes or backgrounds. While most people think of transparent as just one more color, when you look at how Java handles pixels, you'll understand why Adobe didn't take the time to do this themselves.

 

More Entries

Jon Hartmann, July 2011

I'm Jon Hartmann and I'm a Javascript fanatic, UX/UI evangelist and former ColdFusion master. I blog about mysterious error messages, user interface design questions, and all things baffling and irksome about programming for the web.

Learn more about me on LinkedIn.