#include <coplfilr.h>
Inheritance diagram for AdobeColourTableFilter:
Public Member Functions | |
AdobeColourTableFilter () | |
Constructor for a Adobe Colour Table palette filter. | |
~AdobeColourTableFilter () | |
Destructor for a Adobe Colour Table palette filter. | |
BOOL | Init () |
Initialise the filter, attaches OIL filter. | |
INT32 | HowCompatible (PathName &Filename, ADDR HeaderStart, UINT32 HeaderSize, UINT32 FileSize) |
Examines a file to see how compatable it is with this filter. | |
virtual BOOL | PreImport () |
Reads the MS palette file header to see how many colours are in the file. | |
virtual BOOL | ImportPalette () |
Imports colours from an Abode Colour Table. | |
virtual BOOL | PostImport () |
Called to allow post import cleanup (if required) for this filter. | |
Private Member Functions | |
CC_DECLARE_DYNAMIC (AdobeColourTableFilter) |
Definition at line 270 of file coplfilr.h.
|
Constructor for a Adobe Colour Table palette filter.
Definition at line 1722 of file coplfilr.cpp. 01723 { 01724 // Set up filter descriptions. 01725 FilterName.Load(_R(IDT_FILTERNAME_ADOBECOLOURTABLE)); 01726 FilterInfo.Load(_R(IDT_FILTERINFO_ADOBECOLOURTABLE)); 01727 FilterID = FILTERID_ADOBECOLOURTABLE; 01728 01729 #ifndef STANDALONE 01730 Flags.CanImport = TRUE; 01731 Flags.CanExport = FALSE; 01732 #else 01733 Flags.CanImport = FALSE; 01734 Flags.CanExport = FALSE; 01735 #endif 01736 01737 #ifndef DO_EXPORT 01738 Flags.CanExport = FALSE; 01739 #endif 01740 }
|
|
Destructor for a Adobe Colour Table palette filter.
Definition at line 1753 of file coplfilr.cpp.
|
|
|
|
Examines a file to see how compatable it is with this filter.
Reimplemented from Filter. Definition at line 1791 of file coplfilr.cpp. 01792 { 01793 PORTNOTE("byteorder", "TODO: Check byte ordering") 01794 // Adobe colour tables are just raw data. We have to go on file extension 01795 ERROR2IF(pOILFilter==NULL, 0, "No oil filter present"); 01796 return ((AdobeColourTableOILFilter*)pOILFilter)->HowCompatible(Filename); 01797 }
|
|
Imports colours from an Abode Colour Table.
Implements PaletteFilter. Definition at line 1827 of file coplfilr.cpp. 01828 { 01829 ERROR2IF(m_pImportFile==NULL, FALSE, "NULL pointer"); 01830 01831 BOOL ok = StartPercentage(); 01832 01833 while ( ok && m_pImportFile->good() && (m_pImportFile->tell()<m_pImportFile->Size()) ) 01834 { 01835 // Read the RGB values for this colour from the file 01836 BYTE ColourDef[3]; 01837 m_pImportFile->read(ColourDef, 3); 01838 01839 // Add the colour to the imported colours list 01840 if (m_pImportFile->good()) 01841 ok = ProcessRGBColour(ColourDef[0]/(double)0xff, ColourDef[1]/(double)0xff, ColourDef[2]/(double)0xff); 01842 01843 SetPercentage(); 01844 } 01845 01846 return ok && m_pImportFile->good(); 01847 }
|
|
Initialise the filter, attaches OIL filter.
Implements Filter. Definition at line 1769 of file coplfilr.cpp. 01770 { 01771 // Get the OILFilter object 01772 pOILFilter = new AdobeColourTableOILFilter(this); 01773 01774 return (pOILFilter != NULL); 01775 }
|
|
Called to allow post import cleanup (if required) for this filter.
Implements PaletteFilter. Definition at line 1860 of file coplfilr.cpp. 01861 { 01862 // Nothing to do, no cleanup required. 01863 return TRUE; 01864 }
|
|
Reads the MS palette file header to see how many colours are in the file.
Implements PaletteFilter. Definition at line 1810 of file coplfilr.cpp. 01811 { 01812 // No setup required 01813 return TRUE; 01814 }
|