#include <frameops.h>
Inheritance diagram for GIFAnimationExportParam:
Public Member Functions | |
GIFAnimationExportParam () | |
Default constructor. | |
GIFAnimationExportParam (UINT32 Count, KernelBitmap **pBitmap) | |
Used to pass around lists of bitmaps. Note that deleting the bitmap array is the responsibility of the caller. | |
~GIFAnimationExportParam () | |
Default destructor. | |
virtual UINT32 | GetBitmapCount () |
For getting the number of bitmaps in the array! | |
virtual KernelBitmap * | GetBitmap (UINT32 Index) |
For safely getting a pointer to a bitmap in the bitmap array. | |
virtual BOOL | AddBitmap (KernelBitmap *pBitmap) |
Tries to add the bitmap to the list. Uses the class variables m_pBitmaps and m_BitmapCount. Copied from BitmapSGallery and BitmapExportParam way of doing things so that we are compatible. Not the best way of doing it! | |
UINT32 | GetRegeneratedBitmapPosition () const |
void | SetRegeneratedBitmapPosition (const UINT32 Pos) |
virtual UINT32 | GetLayerCount () |
For getting the number of layers/bitmaps in the array! | |
virtual Layer * | GetLayer (UINT32 Index) |
For safely getting a pointer to a bitmap in the bitmap array. | |
virtual BOOL | AddLayer (Layer *pLayer) |
For adding a layer to list ready for exporting the GIF animation. Uses the class variables m_pLayers and m_LayerCount. | |
virtual BOOL | AddLayerAndBitmap (Layer *pLayer, KernelBitmap *pBitmap) |
For adding a layer to list ready for exporting the GIF animation. Uses the class variables m_pLayers and m_LayerCount. | |
AnimPropertiesParam & | GetSpreadAnimPropertiesParam () |
Returns the Animation Properties details for this GIFAnimationExportParam. | |
void | SetSpreadAnimPropertiesParam (const AnimPropertiesParam &Param) |
DWORD | GetAnimLoop () const |
DWORD | GetGlobalAnimDelay () const |
WEB_PALETTE | GetPalette () const |
PALETTE_COLOURS | GetPaletteCols () const |
DWORD | GetNumColsInPalette () const |
DITHER | GetDither () const |
BOOL | GetUseSystemCols () const |
BOOL | GetIsBackGroundTransp () const |
virtual DocRect | GetBoundingRect () const |
Returns the bounding rectangle of the animation. | |
DocRect | GetAnimationBoundingRect () const |
void | SetAnimationBoundingRect (const DocRect &BoundingRect) |
Protected Attributes | |
AnimPropertiesParam | m_AnimPropertiesParam |
KernelBitmap ** | m_pBitmaps |
UINT32 | m_BitmapCount |
Layer ** | m_pLayers |
UINT32 | m_LayerCount |
UINT32 | m_RegeneratedBitmapPosition |
Private Member Functions | |
CC_DECLARE_DYNAMIC (GIFAnimationExportParam) |
> class GIFAnimationExportParam : public BitmapExportParam
Definition at line 360 of file frameops.h.
|
Default constructor.
Definition at line 4155 of file frameops.cpp. 04156 { 04157 m_BitmapCount = 0; 04158 m_pBitmaps = NULL; 04159 04160 m_LayerCount = 0; 04161 m_pLayers = NULL; 04162 04163 m_RegeneratedBitmapPosition = 0; 04164 }
|
|
Used to pass around lists of bitmaps. Note that deleting the bitmap array is the responsibility of the caller.
Definition at line 4207 of file frameops.cpp. 04208 { 04209 ERROR3IF(Count == 0, "Zero bitmap count, that's not right"); 04210 ERROR3IF(pBitmap == NULL, "NULL bitmap array"); 04211 ERROR3IF(!(*pBitmap)->IS_KIND_OF(KernelBitmap), "This dosen't seem to be an array of kernel bitmaps"); 04212 04213 m_BitmapCount = Count; 04214 m_pBitmaps = pBitmap; 04215 04216 // set up everything else to defaults 04217 m_RegeneratedBitmapPosition = 0; 04218 m_LayerCount = 0; 04219 m_pLayers = NULL; 04220 }
|
|
Default destructor.
Definition at line 4176 of file frameops.cpp. 04177 { 04178 // free up the arrays that we grabbed 04179 if (m_pBitmaps != NULL) 04180 { 04181 CCFree(m_pBitmaps); 04182 m_pBitmaps = NULL; 04183 m_BitmapCount = 0; 04184 } 04185 if (m_pLayers != NULL) 04186 { 04187 CCFree(m_pLayers); 04188 m_pLayers = NULL; 04189 m_LayerCount = 0; 04190 } 04191 }
|
|
Tries to add the bitmap to the list. Uses the class variables m_pBitmaps and m_BitmapCount. Copied from BitmapSGallery and BitmapExportParam way of doing things so that we are compatible. Not the best way of doing it!
Definition at line 4382 of file frameops.cpp. 04383 { 04384 ERROR2IF(pBitmap == NULL,FALSE,"Addbitmap given null bitmap"); 04385 BOOL ok = TRUE; 04386 04387 // If we have a null list then just allocate the first item 04388 if (m_pBitmaps == NULL) 04389 { 04390 // Claim selected space 04391 m_pBitmaps = (KernelBitmap**) CCMalloc(sizeof(KernelBitmap*)); 04392 if (m_pBitmaps == NULL) 04393 ok = FALSE; 04394 else 04395 m_pBitmaps[0] = pBitmap; 04396 m_BitmapCount = 1; 04397 } 04398 else 04399 { 04400 // Add to end of selection 04401 KernelBitmap** pTemp = (KernelBitmap**) CCRealloc(m_pBitmaps, (m_BitmapCount + 1) * sizeof(KernelBitmap*)); 04402 if (pTemp == NULL) 04403 ok = FALSE; 04404 else 04405 { 04406 m_pBitmaps = pTemp; 04407 m_pBitmaps[m_BitmapCount] = pBitmap; 04408 } 04409 m_BitmapCount++; 04410 } 04411 04412 return ok; 04413 }
|
|
For adding a layer to list ready for exporting the GIF animation. Uses the class variables m_pLayers and m_LayerCount.
Definition at line 4333 of file frameops.cpp. 04334 { 04335 ERROR2IF(pLayer == NULL,FALSE,"AddLayer given null layer"); 04336 BOOL ok = TRUE; 04337 04338 // If we have a null list then just allocate the first item 04339 if (m_pLayers == NULL) 04340 { 04341 // Claim selected space 04342 m_pLayers = (Layer**) CCMalloc(sizeof(Layer*)); 04343 if (m_pLayers == NULL) 04344 ok = FALSE; 04345 else 04346 m_pLayers[0] = pLayer; 04347 m_LayerCount = 1; 04348 } 04349 else 04350 { 04351 // Add to end of selection 04352 Layer** pTemp = (Layer**) CCRealloc(m_pLayers, (m_LayerCount + 1) * sizeof(Layer*)); 04353 if (pTemp == NULL) 04354 ok = FALSE; 04355 else 04356 { 04357 m_pLayers = pTemp; 04358 m_pLayers[m_LayerCount] = pLayer; 04359 } 04360 m_LayerCount++; 04361 } 04362 04363 return ok; 04364 }
|
|
For adding a layer to list ready for exporting the GIF animation. Uses the class variables m_pLayers and m_LayerCount.
Definition at line 4313 of file frameops.cpp. 04314 { 04315 // Let the called functions do the parameter checking! 04316 return AddLayer(pLayer) && AddBitmap(pBitmap); 04317 }
|
|
|
|
Definition at line 399 of file frameops.h. 00399 { return m_AnimPropertiesParam.GetBoundingRect(); }
|
|
Definition at line 388 of file frameops.h. 00388 { return m_AnimPropertiesParam.GetAnimLoop(); }
|
|
For safely getting a pointer to a bitmap in the bitmap array.
Reimplemented from BitmapExportParam. Definition at line 4251 of file frameops.cpp. 04252 { 04253 ERROR2IF(Index >= m_BitmapCount, NULL, "Index out of bounds"); 04254 ERROR2IF(m_pBitmaps == NULL, NULL, "NULL array"); 04255 04256 ERROR3IF(!(m_pBitmaps[Index])->IS_KIND_OF(KernelBitmap), "This dosen't seem to be a pointer to a kernel bitmap"); 04257 return m_pBitmaps[Index]; 04258 }
|
|
For getting the number of bitmaps in the array!
Reimplemented from BitmapExportParam. Definition at line 4233 of file frameops.cpp. 04234 { 04235 return m_BitmapCount; 04236 }
|
|
Returns the bounding rectangle of the animation.
Definition at line 4456 of file frameops.cpp. 04457 { 04458 // Recover the bounding rect of the animation from our copy of the spread's 04459 // animation properties. 04460 DocRect BoundingRect = m_AnimPropertiesParam.GetBoundingRect(); 04461 // We are only interested in the size and so translate it to zero 04462 BoundingRect.Translate(-BoundingRect.lo.x, -BoundingRect.lo.y); 04463 // return it to the caller 04464 return BoundingRect; 04465 }
|
|
Definition at line 393 of file frameops.h. 00393 { return m_AnimPropertiesParam.GetDither(); }
|
|
Definition at line 389 of file frameops.h. 00389 { return m_AnimPropertiesParam.GetGlobalAnimDelay(); }
|
|
Definition at line 395 of file frameops.h. 00395 { return m_AnimPropertiesParam.GetIsBackGroundTransp(); }
|
|
For safely getting a pointer to a bitmap in the bitmap array.
Reimplemented from BitmapExportParam. Definition at line 4290 of file frameops.cpp. 04291 { 04292 ERROR2IF(Index >= m_LayerCount, NULL, "Index out of bounds"); 04293 ERROR2IF(m_pLayers == NULL, NULL, "NULL array"); 04294 04295 ERROR3IF(!(m_pLayers[Index])->IS_KIND_OF(Layer), "This dosen't seem to be a pointer to a layer"); 04296 return m_pLayers[Index]; 04297 }
|
|
For getting the number of layers/bitmaps in the array!
Reimplemented from BitmapExportParam. Definition at line 4272 of file frameops.cpp. 04273 { 04274 return m_LayerCount; 04275 }
|
|
Definition at line 392 of file frameops.h. 00392 { return m_AnimPropertiesParam.GetNumColsInPalette(); }
|
|
Definition at line 390 of file frameops.h. 00390 { return m_AnimPropertiesParam.GetPalette(); }
|
|
Definition at line 391 of file frameops.h. 00391 { return m_AnimPropertiesParam.GetPaletteCols(); }
|
|
Definition at line 376 of file frameops.h. 00376 { return m_RegeneratedBitmapPosition; }
|
|
Returns the Animation Properties details for this GIFAnimationExportParam.
Definition at line 4441 of file frameops.cpp. 04442 { 04443 return m_AnimPropertiesParam; 04444 }
|
|
Definition at line 394 of file frameops.h. 00394 { return m_AnimPropertiesParam.GetUseSystemCols(); }
|
|
Definition at line 400 of file frameops.h. 00400 { m_AnimPropertiesParam.SetBoundingRect(BoundingRect); }
|
|
Definition at line 377 of file frameops.h. 00377 { m_RegeneratedBitmapPosition = Pos; }
|
|
Definition at line 4426 of file frameops.cpp. 04427 { 04428 m_AnimPropertiesParam = Param; 04429 }
|
|
Definition at line 404 of file frameops.h. |
|
Definition at line 414 of file frameops.h. |
|
Definition at line 416 of file frameops.h. |
|
Definition at line 413 of file frameops.h. |
|
Definition at line 415 of file frameops.h. |
|
Definition at line 417 of file frameops.h. |