TImageCache Class Reference

Manages a single cache of images for all control classes. More...

#include <TImageCache.h>

List of all members.

Static Public Member Functions

static CGImageRef GetImage (CFURLRef url)
static CGImageRef GetImage (CFBundleRef bundle, CFStringRef resourceName, CFStringRef resourceType, CFStringRef subDirName=NULL)
static void Reset ()
static CGImageRef PreRenderImage (CGImageRef theImage)
 This routine creates an offscreen bitmap graphics context pointing at a data buffer allocated with malloc() that is large enough to hold a rendered version of the image passed in to it.


Detailed Description

Manages a single cache of images for all control classes.

Todo:
Add a method to draw an image in a given context. This will allo us to change the way images are drawn without requiring changes in the control classes themselves.


Member Function Documentation

CGImageRef TImageCache::GetImage CFBundleRef  bundle,
CFStringRef  resourceName,
CFStringRef  resourceType,
CFStringRef  subDirName = NULL
[static]
 

CGImageRef TImageCache::GetImage CFURLRef  url  )  [static]
 

CGImageRef TImageCache::PreRenderImage CGImageRef  theImage  )  [static]
 

This routine creates an offscreen bitmap graphics context pointing at a data buffer allocated with malloc() that is large enough to hold a rendered version of the image passed in to it.

After the image is drawn into this context, a data provider is created for the data buffer. A CGImageRef is created with this data provider and returned. The buffer used to hold the image data is allocated aligned on a 16-byte boundary, to give the OS the option to use Altivec.

Parameters:
theImage An image to render into an offscreen buffer.
Returns:
New CGImageRef owned by the called.
Todo:
Instead of using the image's bit depth, use the bit depth of the main device. This should help speed up drawing by not requiring up or downsampling to blit to the device buffer.

Flip the context before rendering the image. Then control classes could use CGContextDrawImage instead of HIViewDrawCGImage and hopefully that would speed things up a little.

void TImageCache::Reset  )  [static]
 


The documentation for this class was generated from the following files:




Generated on Sat Jul 8 13:09:17 2006 for AUGUI Framework by doxygen1.4.6

hosted on SourceForge.net Logo