#include <cdrfiltr.h>
Inheritance diagram for CDRBitmapStore:
Public Member Functions | |
BOOL | AddChunkToStore (RIFFFile *RIFF, BOOL Pattern, CDRFilter *C) |
Adds a bitmap to the store, converting it now rather than storing it up for later. | |
KernelBitmap * | FindBitmap (DWORD Reference) |
Finds a bitmap within the store. Finding a bitmap sets it's used flag to TRUE to avoid it being deleted. | |
Private Member Functions | |
CC_DECLARE_MEMDUMP (CDRBitmapStore) |
Definition at line 342 of file cdrfiltr.h.
|
Adds a bitmap to the store, converting it now rather than storing it up for later.
Definition at line 1069 of file cdrfill.cpp. 01070 { 01071 CDRBitmapStoredItem *Item = new CDRBitmapStoredItem; 01072 01073 if(Item == 0) 01074 return FALSE; 01075 01076 // convert the bitmap 01077 FOURCC Reference = 0; // the reference number of this thingy 01078 01079 // convert depending on the type of thing 01080 if(Pattern) 01081 { 01082 Item->pBitmap = CDRBitmap::ConvertPattern(RIFF, &Reference, C); 01083 } 01084 else 01085 { 01086 switch(C->Version) 01087 { 01088 case CDRVERSION_5: 01089 Item->pBitmap = CDRBitmap::ConvertBitmap5(RIFF, &Reference, C); 01090 break; 01091 01092 default: 01093 Item->pBitmap = CDRBitmap::ConvertBitmap4(RIFF, &Reference, C); 01094 break; 01095 } 01096 } 01097 01098 // check that we got one 01099 if(Item->pBitmap == 0) 01100 return FALSE; 01101 01102 // make a nice name for it 01103 String_256 Name; 01104 if(Pattern) 01105 Name.MakeMsg(_R(IDT_CDRPATTERNNAME), CDRFilter::PatternNumber++); 01106 else 01107 Name.MakeMsg(_R(IDT_CDRBITMAPNAME), CDRFilter::BitmapNumber++); 01108 01109 // and set the name 01110 Item->pBitmap->ActualBitmap->SetName(Name); 01111 01112 // store the reference 01113 Item->Reference = Reference; 01114 01115 // add the item to this list 01116 AddTail(Item); 01117 01118 return TRUE; 01119 }
|
|
|
|
Finds a bitmap within the store. Finding a bitmap sets it's used flag to TRUE to avoid it being deleted.
Definition at line 1137 of file cdrfill.cpp. 01138 { 01139 CDRBitmapStoredItem *Item = (CDRBitmapStoredItem *)GetHead(); 01140 01141 // go through the list of items searching for the reference number given 01142 while(Item != 0) 01143 { 01144 if(Item->Reference == Reference) 01145 { 01146 // set the used flag 01147 Item->Used = TRUE; 01148 01149 return Item->pBitmap; 01150 } 01151 01152 Item = (CDRBitmapStoredItem *)GetNext(Item); 01153 } 01154 01155 return 0; 01156 }
|