#include <expcol.h>
Inheritance diagram for ExportedColours:
Public Member Functions | |
ExportedColours () | |
Construct the class which encapsulates a list of exported colours. | |
~ExportedColours () | |
Destroy the class which encapsulates a list of exported colours. | |
BOOL | AddColour (IndexedColour *pNewCol, INT32 RecordNumber) |
Add the specified colour to the list of already exported colours. | |
BOOL | AddColour (PColourRGBT *pNewRGBCol, INT32 RecordNumber) |
Add the specified colour to the list of already exported colours. | |
ExportColour * | GetColour (IndexedColour *pSearchCol) |
Find an indexed colour in the exported list. | |
ExportColour * | GetColour (PColourRGBT *pNewRGBCol) |
Find a simpple RGB colour in the exported list. | |
Protected Attributes | |
ExportColourList | Colours |
Definition at line 184 of file expcol.h.
|
Construct the class which encapsulates a list of exported colours.
Definition at line 265 of file expcol.cpp.
|
|
Destroy the class which encapsulates a list of exported colours.
Definition at line 283 of file expcol.cpp.
|
|
Add the specified colour to the list of already exported colours.
Definition at line 331 of file expcol.cpp. 00332 { 00333 // Add the colour onto our list 00334 ExportColour * pExpCol = Colours.AddColour(pNewRGBCol, RecordNumber); 00335 if (pExpCol) 00336 return TRUE; 00337 00338 return FALSE; 00339 }
|
|
Add the specified colour to the list of already exported colours.
Definition at line 304 of file expcol.cpp. 00305 { 00306 // Add the colour onto our list 00307 ExportColour * pExpCol = Colours.AddColour(pNewCol, RecordNumber); 00308 if (pExpCol) 00309 return TRUE; 00310 00311 return FALSE; 00312 }
|
|
Find a simpple RGB colour in the exported list.
Definition at line 391 of file expcol.cpp. 00392 { 00393 if (pSearchRGBCol == NULL) 00394 { 00395 ERROR3("ExportedColours::GetColour (Simple )- searching for a null indexed colour!"); 00396 } 00397 00398 ExportColour* pExportedColour = (ExportColour *)Colours.GetHead(); 00399 while (pExportedColour) 00400 { 00401 // Only check if this is a simple colour 00402 if (pExportedColour->pCol == NULL) 00403 { 00404 // Compare the simple RGB colours and return the match if they are the same 00405 if ( 00406 pExportedColour->SimpleRGBColour.Red == pSearchRGBCol->Red && 00407 pExportedColour->SimpleRGBColour.Green == pSearchRGBCol->Green && 00408 pExportedColour->SimpleRGBColour.Blue == pSearchRGBCol->Blue && 00409 pExportedColour->SimpleRGBColour.Transparent == pSearchRGBCol->Transparent 00410 ) 00411 return pExportedColour; 00412 } 00413 00414 // Try the next colour in the list 00415 pExportedColour = (ExportColour *)Colours.GetNext(pExportedColour); 00416 } 00417 00418 // No - return failure. 00419 return NULL; 00420 }
|
|
Find an indexed colour in the exported list.
Definition at line 355 of file expcol.cpp. 00356 { 00357 if (pSearchCol == NULL) 00358 { 00359 ERROR3("ExportedColours::GetColour - searching for a null indexed colour!"); 00360 } 00361 00362 ExportColour* pExportedColour = (ExportColour *)Colours.GetHead(); 00363 while (pExportedColour) 00364 { 00365 // Compare the indexed colour pointers and return the match if they are the same 00366 if (pExportedColour->pCol == pSearchCol) 00367 return pExportedColour; 00368 00369 // Try the next colour in the list 00370 pExportedColour = (ExportColour *)Colours.GetNext(pExportedColour); 00371 } 00372 00373 // No - return failure. 00374 return NULL; 00375 }
|
|
|