CompositeImageTest (Part 1)

CompositeImageTest started off as a simple project that renders an NSString and a background NSImage into a destination NSImage. I kind of got carried away with and away from the whole composite image thing and project produced a handful of use Cocoa classes.

Let’s start with screenshots:

CompositeImageTest Screenshot

This shows two images and a string being composited together to produce a third NSImage. The image is being displayed in an (editable NSImageView) and can be copied and pasted into other applications (e.g. Preview). As far as the application is concerned the composite image is just an NSImage and can be used in any way the NSImage can be used (button/menu icons etc). The parameters of the image are a simple plist based XML file. The example file used to produce the image above is here: http://toxic-public.googlecode.com/svn/tags/BlogTag_20070927_729/Misc/CompositeImageTest/Resources/Test1.tx-composite-image (you will probably need to “Save As” this XML file).

Here is a second screenshot:

CompositeImage Test - Second Screenshot

This shows a simple HTML page being rendered into the same NSImageView. Again the HTML is being rendered into an NSImage (via a custom NSImageRep subclass) and can be copied and pasted just like an image.

The subversion repository for CompositeImageTest is http://toxic-public.googlecode.com/svn/tags/BlogTag_20070927_729/Projects/Misc/CompositeImageTest/. Most classes are headerdoc-ed (albeit lightly) and I’ll be describing some of the more interesting classes in the next few postings.

This entry was posted in Default. Bookmark the permalink.

Comments are closed.