00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
#include <Carbon/Carbon.h>
00011
#include <TRect.h>
00012
00020 class TImageCache
00021 {
00022
public:
00023
static CGImageRef
GetImage(CFURLRef url);
00024
static CGImageRef GetImage(CFBundleRef bundle, CFStringRef resourceName, CFStringRef resourceType, CFStringRef subDirName=NULL);
00025
static void Reset();
00026
00027
static CGImageRef
PreRenderImage(CGImageRef theImage);
00028
private:
00029
static CFMutableDictionaryRef mImageCache;
00030
00031
static void ReleaseImageBuffer(
void * info,
const void* data, size_t dataSize);
00032 };