#include <bmpfiltr.h>
Inheritance diagram for BMPExportOptions:
Public Member Functions | |
BMPExportOptions () | |
Default constructor. | |
BMPExportOptions (const FilterType FilterID, const StringBase *pFilterName) | |
Constructor for a BMPExportOptions object to provide BMP specific options. | |
virtual BOOL | RetrieveDefaults () |
Compares the contents of this and pOther objects Gets GIF specific preferences Notes: See BitmapExportOptions for interface details. | |
virtual BOOL | SetAsDefaults () const |
Provides additional implementation to set GIF specific info as defaults See Also: BitmapExportInfo::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 () |
virtual DITHER | GetDither () const |
Support function to obtain export options. | |
virtual BOOL | SetDither (const DITHER &Dither) |
Support function to set up information for the ensuing export See Also: GetDither(). | |
PALETTE | GetPalette () const |
Support function to obtain export options. | |
BOOL | SetPalette (const PALETTE &Palette) |
Support function to set up information for the ensuing export See Also: GetPalette(). | |
BMP_COMPRESSION | GetCompression () const |
Support function to obtain export options. | |
BOOL | SetCompression (const BMP_COMPRESSION &Compression) |
Support function to set up information for the ensuing export See Also: GetCompression(). | |
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 palette object in this class. | |
virtual UINT32 | GetFilterNameStrID () |
Protected Attributes | |
DITHER | m_Dither |
PALETTE | m_Palette |
BMP_COMPRESSION | m_Compression |
Definition at line 128 of file bmpfiltr.h.
|
Default constructor.
Definition at line 142 of file bmpfiltr.cpp. 00143 : m_Dither(XARADITHER_NONE), 00144 m_Palette(DefaultExportPalette), 00145 m_Compression(BMP_RGB) 00146 { 00147 // Empty. 00148 }
|
|
Constructor for a BMPExportOptions object to provide BMP specific options.
Definition at line 161 of file bmpfiltr.cpp. 00162 : BitmapExportOptions(_R(IDD_EXPORTBMPOPTS), FilterID, pFilterName), 00163 m_Dither(XARADITHER_NONE), 00164 m_Palette(DefaultExportPalette), 00165 m_Compression(BMP_RGB) 00166 { 00167 // Empty. 00168 }
|
|
Sets the contents of this object from the passed object See Also: BitmapExportOptions::MakeCopy().
Reimplemented from BitmapExportOptions. Definition at line 183 of file bmpfiltr.cpp. 00184 { 00185 // copy the base class first 00186 if (!BitmapExportOptions::CopyFrom(pSource)) 00187 return FALSE; 00188 00189 // must be the same class, otherwise the base class function above returns FALSE 00190 BMPExportOptions *pOther = (BMPExportOptions *)pSource; 00191 00192 m_Dither = pOther->m_Dither; 00193 m_Palette = pOther->m_Palette; 00194 m_Compression = pOther->m_Compression; 00195 00196 return TRUE; 00197 };
|
|
Copies the information from the BitmapExportOptions object passed in as the argument to the palette object in this class.
Reimplemented from BitmapExportOptions. Definition at line 200 of file bmpfiltr.cpp. 00201 { 00202 ASSERT(FALSE); 00203 /* 00204 // copy the base class first 00205 if (!BitmapExportOptions::FileTypeChangeCopyFrom(pSource)) 00206 return FALSE; 00207 00208 BMPExportOptions* pOther = (BMPExportOptions*)pSource; 00209 00210 // Coming from a jpeg image 00211 if( pOther->IS_KIND_OF(JPEGExportOptions) ) 00212 { 00213 m_Dither = XARADITHER_NONE; 00214 m_Palette = DefaultExportPalette; 00215 } 00216 else 00217 { 00218 // Coming from a gif or png image. 00219 m_Dither = pOther->m_Dither; 00220 m_Palette = pOther->m_Palette; 00221 } 00222 00223 m_Compression = BMP_RGB; 00224 00225 // Ensure that the bitmap depth is less than 32 bpp. 00226 if( GetDepth() == 32 ) 00227 { 00228 SetDepth( 24 ); 00229 } 00230 */ 00231 return TRUE; 00232 }
|
|
Support function to obtain export options.
Definition at line 446 of file bmpfiltr.cpp. 00447 { 00448 return m_Compression; 00449 }
|
|
Support function to obtain export options.
Reimplemented from BitmapExportOptions. Definition at line 371 of file bmpfiltr.cpp. 00372 { 00373 return m_Dither; 00374 }
|
|
Reimplemented from BitmapExportOptions. Definition at line 158 of file bmpfiltr.h. 00158 { return _R(IDT_FILTERNAME_BMP) /*_R(IDN_FILTERNAME_ACCUSOFTBMP)*/ /*_R(IDT_BMP_FILTERNAME) */;}
|
|
Support function to obtain export options.
Definition at line 409 of file bmpfiltr.cpp. 00410 { 00411 return m_Palette; 00412 }
|
|
Reimplemented from BitmapExportOptions. Definition at line 142 of file bmpfiltr.h. 00142 { return TRUE; }
|
|
Reads this object from the given record.
Reimplemented from BitmapExportOptions. Definition at line 351 of file bmpfiltr.cpp. 00352 { 00353 return BitmapExportOptions::Read(pRec) && 00354 pRec->ReadINT16((INT16*) &m_Dither) && 00355 pRec->ReadINT16((INT16*) &m_Palette) && 00356 pRec->ReadINT16((INT16*) &m_Compression); 00357 }
|
|
Compares the contents of this and pOther objects Gets GIF specific preferences Notes: See BitmapExportOptions for interface details.
Reimplemented from BitmapExportOptions. Definition at line 275 of file bmpfiltr.cpp. 00276 { 00277 if (!BitmapExportOptions::RetrieveDefaults()) 00278 { 00279 return FALSE; 00280 } 00281 00282 SetDither((DITHER)BMPFilter::GetDefaultExportDither()); 00283 SetPalette(DefaultExportPalette); 00284 00285 BOOL Compression = DefaultExportCompression; 00286 ERROR2IF(Compression > 1, FALSE, "Invalid Compression"); 00287 SetCompression((BMP_COMPRESSION)Compression); 00288 00289 return TRUE; 00290 }
|
|
Provides additional implementation to set GIF specific info as defaults See Also: BitmapExportInfo::SetAsDefaults().
Reimplemented from BitmapExportOptions. Definition at line 303 of file bmpfiltr.cpp. 00304 { 00305 if (!BitmapExportOptions::SetAsDefaults()) 00306 { 00307 return FALSE; 00308 } 00309 00310 BMPFilter::SetDefaultExportDither(GetDither()); 00311 DefaultExportCompression = (BOOL)GetCompression(); 00312 DefaultExportPalette = GetPalette(); 00313 00314 return TRUE; 00315 }
|
|
Support function to set up information for the ensuing export See Also: GetCompression().
Definition at line 465 of file bmpfiltr.cpp. 00466 { 00467 ERROR2IF(Compression != BMP_RLE && Compression != BMP_RGB, FALSE, "Invalid Compression"); 00468 00469 m_Compression = Compression; 00470 00471 return TRUE; 00472 }
|
|
Support function to set up information for the ensuing export See Also: GetDither().
Reimplemented from BitmapExportOptions. Definition at line 390 of file bmpfiltr.cpp. 00391 { 00392 if (m_Dither != Dither) 00393 SetTempFileMatchesExportOptions(FALSE); 00394 m_Dither = Dither; 00395 return TRUE; 00396 }
|
|
Support function to set up information for the ensuing export See Also: GetPalette().
Definition at line 428 of file bmpfiltr.cpp.
|
|
Writes this object to the given record.
Reimplemented from BitmapExportOptions. Definition at line 330 of file bmpfiltr.cpp. 00331 { 00332 return BitmapExportOptions::Write(pRec) && 00333 pRec->WriteINT16((INT16) m_Dither) && 00334 pRec->WriteINT16((INT16) m_Palette) && 00335 pRec->WriteINT16((INT16) m_Compression); 00336 }
|
|
Definition at line 165 of file bmpfiltr.h. |
|
Definition at line 163 of file bmpfiltr.h. |
|
Reimplemented from BitmapExportOptions. Definition at line 164 of file bmpfiltr.h. |