#include <giffiltr.h>
Inheritance diagram for GIFExportOptions:
Public Member Functions | |
GIFExportOptions () | |
Default constructor for a GIFExportOptions object to provide GIF export options. | |
GIFExportOptions (const FilterType FilterID, const StringBase *pFilterName) | |
Constructor for a GIFExportOptions object to provide GIF export options. | |
virtual BOOL | RetrieveDefaults () |
Compares the contents of this and pOther objects See BitmapExportOptions for interface details Notes: Gets GIF specific preferences. | |
virtual BOOL | SetAsDefaults () const |
Provides additional implementation to set GIF specific info as defaults See Also: BitmapExportOptions::SetAsDefaults(). | |
virtual BOOL | Write (CXaraFileRecord *pRec) |
Writes this object to the given record. | |
virtual BOOL | Read (CXaraFileRecord *pRec) |
Reads this object from the given record. | |
virtual BOOL | GetSupportsImageMap () |
BOOL | GetGlobalPalette () const |
void | SetGlobalPalette (UINT32 GlobalPalette) |
UINT32 | GetLeftOffset () const |
void | SetLeftOffset (UINT32 LeftOffset) |
UINT32 | GetTopOffset () const |
void | SetTopOffset (UINT32 TopOffset) |
GIFDisposalMethod | GetAnimationRestore () |
Support function to obtain export options. | |
BOOL | SetAnimationRestore (const GIFDisposalMethod &DisposalMethod) |
Support function to set up information for the ensuing export See Also: GetAnimationRestore(), enum GIFDisposalMethod. | |
CENTISECONDS | GetAnimationDelay () |
Support function to obtain export options. | |
BOOL | SetAnimationDelay (CENTISECONDS Delay) |
Support function to set up information for the ensuing export See Also: GetAnimationDelay(). | |
UINT32 | GetAnimationLoopCount () const |
Support function to obtain export options See Also: SetAnimationLoopCount(). | |
BOOL | SetAnimationLoopCount (UINT32 LoopCount, BOOL Value) |
Support function to set up information for the ensuing export See Also: GetAnimationLoopCount(). | |
Coord | GetAnimationSize () const |
BOOL | SetAnimationSize (const Coord &Size) |
BOOL | GetDelayValueIsDefault () const |
BOOL | SetDelayValueIsDefault (BOOL Value) |
virtual BOOL | CopyFrom (BitmapExportOptions *pOther) |
Sets the contents of this object from the passed object See Also: BitmapExportOptions::MakeCopy(). | |
virtual BOOL | FileTypeChangeCopyFrom (BitmapExportOptions *pOther) |
Copies the information from the BitmapExportOptions object passed in as the argument to the variables in this class. | |
virtual UINT32 | GetFilterNameStrID () |
Static Public Member Functions | |
static BOOL | Declare () |
To declare preferences associated with these export options. | |
static KernelBitmap ** | GetBitmapList () |
static void | SetBitmapList (KernelBitmap **pBitmap) |
static UINT32 | GetListSize () |
static void | SetListSize (UINT32 n) |
static void | IncListSize (UINT32 n) |
static void | DecListSize (UINT32 n) |
Public Attributes | |
UINT32 | DelayIndex |
UINT32 | RestoreIndex |
Protected Attributes | |
BOOL | m_GlobalPalette |
UINT32 | m_LeftOffset |
UINT32 | m_TopOffset |
CENTISECONDS | m_AnimDelay |
GIFDisposalMethod | m_AnimDispose |
UINT32 | m_AnimLoop |
Coord | m_AnimSize |
BOOL | DelayValueIsDefault |
Static Protected Attributes | |
static KernelBitmap ** | m_pBitmapList = NULL |
static UINT32 | m_ListSize = 0 |
static CENTISECONDS | g_AnimationDelay = 10 |
static GIFDisposalMethod | g_AnimationRestoreType = GDM_LEAVE |
static UINT32 | g_AnimationLoopCount = 1 |
Definition at line 140 of file giffiltr.h.
|
Default constructor for a GIFExportOptions object to provide GIF export options.
Definition at line 201 of file giffiltr.cpp. 00201 : 00202 DelayIndex(0), 00203 RestoreIndex(0), 00204 m_GlobalPalette(TRUE), 00205 m_LeftOffset(0), 00206 m_TopOffset(0), 00207 m_AnimDelay(g_AnimationDelay), 00208 m_AnimDispose((GIFDisposalMethod) g_AnimationRestoreType), 00209 m_AnimLoop(g_AnimationLoopCount), 00210 m_AnimSize(0, 0), 00211 DelayValueIsDefault(FALSE) 00212 { 00213 g_AnimationLoopCount = 1; 00214 }
|
|
Constructor for a GIFExportOptions object to provide GIF export options.
Definition at line 227 of file giffiltr.cpp. 00228 : MaskedFilterExportOptions(_R(IDD_EXPORTBMPOPTS), FilterID, pFilterName), 00229 DelayIndex(0), 00230 RestoreIndex(0), 00231 m_GlobalPalette(TRUE), 00232 m_LeftOffset(0), 00233 m_TopOffset(0), 00234 m_AnimDelay(g_AnimationDelay), 00235 m_AnimDispose((GIFDisposalMethod) g_AnimationRestoreType), 00236 m_AnimLoop(g_AnimationLoopCount), 00237 m_AnimSize(0, 0), 00238 DelayValueIsDefault(FALSE) 00239 { 00240 g_AnimationLoopCount = 1; 00241 }
|
|
Sets the contents of this object from the passed object See Also: BitmapExportOptions::MakeCopy().
Reimplemented from MaskedFilterExportOptions. Definition at line 256 of file giffiltr.cpp. 00257 { 00258 // copy the base class first 00259 if (!MaskedFilterExportOptions::CopyFrom(pSource)) 00260 return FALSE; 00261 00262 // must be the same class, otherwise the base class function above returns FALSE 00263 GIFExportOptions *pOther = (GIFExportOptions *)pSource; 00264 00265 m_AnimDelay = pOther->m_AnimDelay; 00266 m_AnimDispose = pOther->m_AnimDispose; 00267 m_AnimLoop = pOther->m_AnimLoop; 00268 DelayValueIsDefault = pOther->DelayValueIsDefault; 00269 DelayIndex = pOther->DelayIndex; 00270 RestoreIndex = pOther->RestoreIndex; 00271 m_GlobalPalette = pOther->m_GlobalPalette; 00272 m_LeftOffset = pOther->m_LeftOffset; 00273 m_TopOffset = pOther->m_TopOffset; 00274 m_AnimSize = pOther->m_AnimSize; 00275 00276 return TRUE; 00277 };
|
|
To declare preferences associated with these export options.
Reimplemented from MaskedFilterExportOptions. Definition at line 176 of file giffiltr.cpp. 00177 { 00178 if (Camelot.DeclareSection(_T("Filters"), 10)) 00179 { 00180 Camelot.DeclarePref( NULL, _T("ExportGIFtype"), &g_DefaultGIFType, 0, 3 ); 00181 Camelot.DeclarePref( NULL, _T("AnimationDelay"), &g_AnimationDelay, 0, 65535 ); 00182 Camelot.DeclarePref( NULL, _T("AnimationRestoreType"), (INT32*)&g_AnimationRestoreType, 0, 3 ); 00183 Camelot.DeclarePref( NULL, _T("AnimationLoopCount"), &g_AnimationLoopCount, 0, 65535 ); 00184 } 00185 00186 // All ok 00187 return TRUE; 00188 }
|
|
Definition at line 188 of file giffiltr.h. 00188 { m_ListSize -= n; }
|
|
Copies the information from the BitmapExportOptions object passed in as the argument to the variables in this class.
Reimplemented from MaskedFilterExportOptions. Definition at line 280 of file giffiltr.cpp. 00281 { 00282 if( !MaskedFilterExportOptions::FileTypeChangeCopyFrom(pOther) ) 00283 return FALSE; 00284 00285 // Since we are not copying from another GIFOptions-based object, then the variables 00286 // in this object must be assigned some default values. 00287 m_AnimDelay = g_AnimationDelay; 00288 m_AnimDispose = (GIFDisposalMethod)g_AnimationRestoreType; 00289 m_AnimLoop = g_AnimationLoopCount; 00290 00291 g_AnimationLoopCount = 1; 00292 DelayValueIsDefault = FALSE; 00293 DelayIndex = 0; 00294 RestoreIndex = 0; 00295 00296 m_GlobalPalette = TRUE; 00297 m_LeftOffset = 0; 00298 m_TopOffset = 0; 00299 00300 // Graeme (14-9-00) - Limit the colour depth to be no more than 8bpp. Otherwise we get 00301 // problems with changing file types in the export dialogue. 00302 if ( GetDepth () > 8 ) 00303 { 00304 SetDepth ( 8 ); 00305 } 00306 00307 return TRUE; 00308 }
|
|
Support function to obtain export options.
Definition at line 480 of file giffiltr.cpp. 00481 { 00482 // return m_AnimDelay; 00483 UINT32 Delay = m_pBitmapList[DelayIndex]->GetDelay(); 00484 DelayIndex++; 00485 return Delay; 00486 }
|
|
Support function to obtain export options See Also: SetAnimationLoopCount().
Definition at line 559 of file giffiltr.cpp. 00560 { 00561 return m_AnimLoop; 00562 }
|
|
Support function to obtain export options.
Definition at line 519 of file giffiltr.cpp. 00520 { 00521 // return m_AnimDispose; 00522 GIFDisposalMethod Restore = m_pBitmapList[RestoreIndex]->GetActualBitmap()->GetAnimationRestoreType(); 00523 RestoreIndex++; 00524 return Restore; 00525 }
|
|
|
|
Definition at line 182 of file giffiltr.h. 00182 { return m_pBitmapList; }
|
|
Definition at line 179 of file giffiltr.h. 00179 { return DelayValueIsDefault; }
|
|
Reimplemented from BitmapExportOptions. Definition at line 199 of file giffiltr.h. 00199 { return _R(IDN_FILTERNAME_GIF);}
|
|
Definition at line 158 of file giffiltr.h. 00158 { return m_GlobalPalette; }
|
|
Definition at line 161 of file giffiltr.h. 00161 { return m_LeftOffset; }
|
|
Definition at line 185 of file giffiltr.h. 00185 { return m_ListSize; }
|
|
Reimplemented from BitmapExportOptions. Definition at line 156 of file giffiltr.h. 00156 { return TRUE; }
|
|
Definition at line 164 of file giffiltr.h. 00164 { return m_TopOffset; }
|
|
Definition at line 187 of file giffiltr.h. 00187 { m_ListSize += n; }
|
|
Reads this object from the given record.
Reimplemented from MaskedFilterExportOptions. Definition at line 452 of file giffiltr.cpp. 00453 { 00454 m_GlobalPalette = DelayValueIsDefault = FALSE; 00455 return MaskedFilterExportOptions::Read(pRec) && 00456 pRec->ReadUINT32((UINT32*) &DelayIndex) && 00457 pRec->ReadUINT32((UINT32*) &RestoreIndex) && 00458 pRec->ReadBYTE((BYTE*) &m_GlobalPalette) && 00459 pRec->ReadUINT32((UINT32*) &m_LeftOffset) && 00460 pRec->ReadUINT32((UINT32*) &m_TopOffset) && 00461 pRec->ReadUINT32((UINT32*) &m_AnimDelay) && 00462 pRec->ReadINT16((INT16*) &m_AnimDispose) && 00463 pRec->ReadUINT32((UINT32*) &m_AnimLoop) && 00464 pRec->ReadCoord((DocCoord*) &m_AnimSize) && 00465 pRec->ReadBYTE((BYTE*) &DelayValueIsDefault); 00466 }
|
|
Compares the contents of this and pOther objects See BitmapExportOptions for interface details Notes: Gets GIF specific preferences.
Reimplemented from MaskedFilterExportOptions. Definition at line 355 of file giffiltr.cpp. 00356 { 00357 if (!MaskedFilterExportOptions::RetrieveDefaults()) 00358 { 00359 return FALSE; 00360 } 00361 00362 ERROR2IF(g_AnimationRestoreType != GDM_NONE && g_AnimationRestoreType != GDM_LEAVE && 00363 g_AnimationRestoreType != GDM_BACKTOBACK && g_AnimationRestoreType != GDM_PREVIOUS, 00364 FALSE, "Invalid g_AnimationRestoreType"); 00365 00366 // Ensure that the depth is no more than 8 bits. 00367 if ( GetDepth () > 8 ) 00368 { 00369 this->SetDepth ( 8 ); 00370 } 00371 00372 m_AnimDelay = g_AnimationDelay; 00373 m_AnimDispose = g_AnimationRestoreType; 00374 m_AnimLoop = g_AnimationLoopCount; 00375 00376 // SetMakeTransparent((g_DefaultGIFType >> 1) & 1); 00377 SetMakeInterlaced(g_DefaultGIFType & 1); 00378 00379 return TRUE; 00380 }
|
|
Support function to set up information for the ensuing export See Also: GetAnimationDelay().
Definition at line 502 of file giffiltr.cpp. 00503 { 00504 m_AnimDelay = Delay; 00505 return TRUE; 00506 }
|
|
Support function to set up information for the ensuing export See Also: GetAnimationLoopCount().
Definition at line 579 of file giffiltr.cpp. 00580 { 00581 if(Value) 00582 { 00583 m_AnimLoop = ZERO; 00584 return TRUE; 00585 } 00586 else 00587 { 00588 m_AnimLoop = LoopCount; 00589 return TRUE; 00590 } 00591 }
|
|
Support function to set up information for the ensuing export See Also: GetAnimationRestore(), enum GIFDisposalMethod.
Definition at line 541 of file giffiltr.cpp. 00542 { 00543 m_AnimDispose = DisposalMethod; 00544 return TRUE; 00545 }
|
|
|
|
Provides additional implementation to set GIF specific info as defaults See Also: BitmapExportOptions::SetAsDefaults().
Reimplemented from MaskedFilterExportOptions. Definition at line 393 of file giffiltr.cpp. 00394 { 00395 if (!MaskedFilterExportOptions::SetAsDefaults()) 00396 { 00397 return FALSE; 00398 } 00399 00400 g_AnimationDelay = m_AnimDelay; 00401 00402 g_AnimationRestoreType = m_AnimDispose; 00403 g_AnimationLoopCount = m_AnimLoop; 00404 00405 g_DefaultGIFType = WantTransparent() ? 2 : 0; 00406 g_DefaultGIFType |= WantInterlaced() ? 1 : 0; 00407 00408 return TRUE; 00409 }
|
|
Definition at line 183 of file giffiltr.h. 00183 { m_pBitmapList = pBitmap; }
|
|
Definition at line 180 of file giffiltr.h. 00180 { DelayValueIsDefault = Value; return TRUE; }
|
|
Definition at line 159 of file giffiltr.h. 00159 { m_GlobalPalette = GlobalPalette; }
|
|
Definition at line 162 of file giffiltr.h. 00162 { m_LeftOffset = LeftOffset; }
|
|
Definition at line 186 of file giffiltr.h. 00186 { m_ListSize = n; }
|
|
Definition at line 165 of file giffiltr.h. 00165 { m_TopOffset = TopOffset; }
|
|
Writes this object to the given record.
Reimplemented from MaskedFilterExportOptions. Definition at line 424 of file giffiltr.cpp. 00425 { 00426 return MaskedFilterExportOptions::Write(pRec) && 00427 pRec->WriteUINT32(DelayIndex) && 00428 pRec->WriteUINT32(RestoreIndex) && 00429 pRec->WriteBYTE((BYTE) !!m_GlobalPalette) && 00430 pRec->WriteUINT32(m_LeftOffset) && 00431 pRec->WriteUINT32(m_TopOffset) && 00432 pRec->WriteUINT32((UINT32) m_AnimDelay) && 00433 pRec->WriteINT16((INT16) m_AnimDispose) && 00434 pRec->WriteUINT32(m_AnimLoop) && 00435 pRec->WriteCoord((const DocCoord&) m_AnimSize) && 00436 pRec->WriteBYTE((BYTE) !!DelayValueIsDefault); 00437 }
|
|
Definition at line 196 of file giffiltr.h. |
|
Definition at line 210 of file giffiltr.h. |
|
Definition at line 215 of file giffiltr.h. |
|
Definition at line 217 of file giffiltr.h. |
|
Definition at line 216 of file giffiltr.h. |
|
Definition at line 206 of file giffiltr.h. |
|
Definition at line 207 of file giffiltr.h. |
|
Definition at line 208 of file giffiltr.h. |
|
Definition at line 209 of file giffiltr.h. |
|
Definition at line 203 of file giffiltr.h. |
|
Definition at line 204 of file giffiltr.h. |
|
Definition at line 212 of file giffiltr.h. |
|
Definition at line 211 of file giffiltr.h. |
|
Definition at line 205 of file giffiltr.h. |
|
Definition at line 197 of file giffiltr.h. |