#include <colcontx.h>
Inheritance diagram for ColourContext:

Public Member Functions | |
| ColourContext (View *Scope) | |
| Constructor for a Colour context. This is shared code used by all derived ColourContextXXXX classes. You cannot create vanilla ColourContext objects (virtual functions abound). | |
| virtual | ~ColourContext () |
| Colour context destructor. | |
| virtual BOOL | IsDifferent (ColourContext *Other) const |
| Determine if two colour contexts are not exactly equivalent. | |
| void | ConvertColour (DocColour *Source, ColourGeneric *Result) |
| Converts a Colour into this colour context. The converted colour will be supplied from a cache where possible. | |
| void | ConvertColour (IndexedColour *Source, ColourGeneric *Result) |
| Converts an indexed colour into this colour context. The converted colour will be supplied from a cache where possible. | |
| void | ConvertColour (ColourContext *SourceContext, ColourGeneric *SourceColour, ColourGeneric *Result) |
| Converts a colour in any arbitrary colour context into this colour context. The converted colour will be supplied from a cache where possible. | |
| virtual void | ConvertToCIET (ColourGeneric *Source, DColourCIET *Result)=0 |
| virtual void | ConvertFromCIET (DColourCIET *Source, ColourGeneric *Result)=0 |
| virtual void | CreateExternalTransform () |
| Create an external transform to be used during colour conversions from RGB to the current RCS space. This function uses the Winoil CMS Manager to create the transform. Both forward and backward transforms use logical RGB descriptions. | |
| ColourModel | GetColourModel (void) const |
| Determines the colour model on which this colour context is based. | |
| virtual void | GetModelName (StringBase *Result)=0 |
| virtual BOOL | GetComponentName (INT32 ComponentID, StringBase *Result, BOOL LongName=FALSE)=0 |
| virtual UINT32 | GetComponentCount ()=0 |
| virtual BOOL | SetComponentUnitGroup (UINT32 ComponentID, UnitGroup *pComponentUnitGroup) |
| virtual UnitGroup * | GetComponentUnitGroup (UINT32 ComponentID) |
| Provides the UnitGroup of the given component in the ColourModel. | |
| virtual void | ApplyTint (ColourValue TintFraction, ColourGeneric *SourceAndResult)=0 |
| virtual void | ApplyShade (ColourValue XFraction, ColourValue YFraction, ColourGeneric *SourceAndResult)=0 |
| virtual void | ApplyInputFilter (ColourPlate *FilterDescription, ColourContext *DestContext, ColourGeneric *OutputColour, IndexedColour *SourceIxCol) |
| All colour conversions call this function for the SOURCE context immediately before converting the colour. This gives the input colour context the chance to apply a filtering process to the colour. | |
| virtual void | ApplyOutputFilter (ColourPlate *FilterDescription, ColourContext *SourceContext, ColourGeneric *OutputColour, IndexedColour *SourceIxCol) |
| All colour conversions call this function for the DEST context immediately prior to returning the converted colour to the caller. This gives the output colour context the chance to apply an output filtering process to the output colour. | |
| void | SetColourPlate (ColourPlate *NewColourPlate) |
| Sets a colour separation/plate for this context. | |
| ColourPlate * | GetColourPlate (void) |
| Reads the colour separation/plate for this context. | |
| ColourPlate * | DetachColourPlate (void) |
| Detaches the ColourPlate (if any) currently attached to this ColourContext. The context will no longer use the colour plate descriptor, and will return to default colour separation/correction actions. | |
| void | ColourPlateHasChanged (void) |
| Effectively flushes the caches of all colours currently cached in this ColourContext, so that on the next redraw they will re-convert. | |
| virtual void | GetWhite (ColourGeneric *Result)=0 |
| virtual BOOL | GetProfileTables (BYTE *Tables) |
| virtual BOOL | IsDeviceContext () const |
| void | ConvertColour (DocColour *Source, ColourPacked *Result) |
| Converts a Colour into this colour context. The converted colour will be supplied from a cache where possible Scope: PRIVATE - for use only by 'friend' rendering classes: OSRenderRegion, GRenderRegion. | |
Static Public Member Functions | |
| static BOOL | InitColourContexts (void) |
| static void | DeinitColourContexts (void) |
| static ColourContext * | GetGlobalDefault (ColourModel ColModel) |
| Find a default colour context for a given colour model number within GLOBAL scope. This is a static function, so may be called without having to create an actual ColourContext instance. | |
| static void | GetGlobalDefaults (ColourContextArray *Destination) |
| Find the default contexts used by this Scope: Pretty private. Should only need to be used by document.cpp. | |
| static ColourContextRGBT * | GetCurrentForScreen (void) |
| Code used by all renderers to find the current screen output context. | |
Protected Member Functions | |
| virtual BOOL | Init (void) |
| Colour context initialiser. This is called by the ColourContextList when it wishes to add a context to the list, and makes the context ready for use. This allows the list to compare contexts, and only initialise a given context when it knows the initialisation is absolutely necessary (e.g. allocating a large chunk of memory or calculating a complex table is avoided until we are sure there are no equivalent contexts already available) This function is overridden by colour contexts which actually need to do some initialisation other than just storing a few values away. | |
| BOOL | DecrementUsage (void) |
| Decrements usage-count for a colour context. This count allows us to determine when we can delete unused contexts. | |
| void | IncrementUsage (void) |
| Increments usage-count for a colour context. This count allows us to determine when we can delete unused contexts. | |
| virtual void | PackColour (ColourGeneric *Source, ColourPacked *Result) |
| Converts 128-bit colour representation to 32-bit packed form. | |
| virtual void | UnpackColour (ColourPacked *Source, ColourGeneric *Result) |
| Converts 32-bit packed colour representation to 128-bit form. | |
| void | ConvertColourInternal (DocColour *Source, ColourGeneric *Result) |
| Converts a Colour into this colour context. The converted colour will be supplied from a cache where possible. | |
| void | ConvertColourInternal (DocColour *Source, ColourPacked *Result) |
| Converts a Colour into this colour context. The converted colour will be supplied from a cache where possible (this check is made by the caller function ConvertColour) Scope: PRIVATE - for use only by 'friend' rendering classes: OSRenderRegion, GRenderRegion. | |
| PColourValue | PackColour128 (ColourValue Source) |
| Given a 32-bit (FIXED24) colour definition value, packs it into a 7-bit (unsigned byte) colour definition value. The value is rounded and clipped to lie within gamut (0.0 <= g <= 1.0). | |
| void | UnpackColour128 (PColourValue Source, FIXED24 *Result) |
| Unpacks the packed source colour value into a FIXED24 unpacked format. | |
| PColourValue | PackColour256 (ColourValue Source) |
| Given a 32-bit (FIXED24) colour definition value, packs it into an 8-bit (unsigned byte) colour definition value. The value is rounded and clipped to lie within gamut (0.0 <= g <= 1.0). | |
| void | UnpackColour256 (PColourValue Source, FIXED24 *Result) |
| Unpacks the packed source colour value into a FIXED24 unpacked format. | |
| PColourValue | PackColour360 (ColourValue Source) |
| Given a 32-bit (FIXED24) colour definition value, packs it into a 9-bit (0..359) colour definition value. The value is rounded and clipped to lie within gamut (0.0 <= g <= 1.0). | |
| void | UnpackColour360 (PColourValue Source, FIXED24 *Result) |
| Unpacks the packed source colour value into a FIXED24 unpacked format. | |
| virtual UnitGroup ** | GetComponentUnitGroups ()=0 |
| virtual void | ConvertColourBase (ColourContext *SourceContext, ColourGeneric *Source, ColourGeneric *Result, IndexedColour *SourceIxCol=NULL) |
| Converts a Colour into this colour context, from the default colour context implied by the given colour model Post-processing (as described by the attached ColourPlate object) will be applied to generate colour separations (etc) as required. | |
Static Protected Member Functions | |
| static void | SetGlobalDefault (ColourModel ColModel, ColourContext *Default) |
| Set the default colour context for a given colour model number Scope: private - used internally by ColourContextList::InitColourContexts. | |
Protected Attributes | |
| ColourContextHandle | MyHandle |
| INT32 | UsageCount |
| ColourModel | ColModel |
| ColourPlate * | ColPlate |
| HCMTRANSFORM | CMSTransform |
| View * | ScopeView |
Static Protected Attributes | |
| static ColourContextHandle | NextColourContextHandle = 1 |
Static Private Attributes | |
| static ColourContextArray | GlobalDefaultContext |
Friends | |
| class | DocColour |
| class | ColourContextList |
| class | GRenderRegion |
| class | OSRenderRegion |
Definition at line 173 of file colcontx.h.
|
|
Constructor for a Colour context. This is shared code used by all derived ColourContextXXXX classes. You cannot create vanilla ColourContext objects (virtual functions abound).
When created, relevant conversion parameters (gamma correction etc) are passed in to the constructor.The context stores these parameters so it can quickly compare itself to another context, but it may defer creation of tables and other essential stuff until the Init() function is called (when it is added to the list of available colour contexts). Nobody but the context list can call the Init() function. The passed-in Scope may be NULL, in which case global scope is used. However, if you're using this within the scope of any view, note that you must set up ScopeView properly or colour separated output of some colour models will be incorrect.
Definition at line 215 of file colcontx.cpp. 00216 { 00217 MyHandle = NextColourContextHandle++; 00218 00219 ScopeView = Scope; 00220 00221 UsageCount = 0; 00222 00223 ColPlate = NULL; 00224 00225 PORTNOTE("other","Removed HCMTRANSFORM usage") 00226 #ifndef EXCLUDE_FROM_XARALX 00227 CMSTransform = NULL; 00228 #endif 00229 // ColourModel and Model-specific data must be dealt with in the 00230 // constructor/Init() for the derived ColourContextXXXX class 00231 }
|
|
|
Colour context destructor.
Definition at line 250 of file colcontx.cpp. 00251 { 00252 ENSURE(UsageCount == 0, "ColourContext deleted while still in use!"); 00253 00254 if (ColPlate != NULL) 00255 { 00256 delete ColPlate; 00257 ColPlate = NULL; 00258 } 00259 00260 #ifndef NO_XARACMS 00261 if (CMSTransform != NULL) 00262 { 00263 if (GetApplication()->GetCMSManager() != NULL) 00264 GetApplication()->GetCMSManager()->DestroyTransform(CMSTransform); 00265 CMSTransform = NULL; 00266 } 00267 #endif 00268 }
|
|
||||||||||||||||||||
|
All colour conversions call this function for the SOURCE context immediately before converting the colour. This gives the input colour context the chance to apply a filtering process to the colour.
OutputColour - The colour to be filtered SourceIxCol - NULL, or the original IndexedColour which is being converted. This is used for handling spot colour separation correctly.
Reimplemented in ColourContextCMYK. Definition at line 851 of file colcontx.cpp. 00853 { 00854 // ERROR3IF(FilterDescription == NULL || DestContext == NULL || OutputColour == NULL, "Illegal NULL params"); 00855 // 00856 // if (FilterDescription == NULL) 00857 // return; 00858 // 00859 }
|
|
||||||||||||||||||||
|
All colour conversions call this function for the DEST context immediately prior to returning the converted colour to the caller. This gives the output colour context the chance to apply an output filtering process to the output colour.
OutputColour - The colour to be filtered SourceIxCol - NULL, or the IndexedColour which was the source of the colour being converted. This is only used for information when preparing spot colour separations.
Reimplemented in ColourContextRGBT, and ColourContextCMYK. Definition at line 899 of file colcontx.cpp. 00901 { 00902 // ERROR3IF(FilterDescription == NULL || SourceContext == NULL || OutputColour == NULL, "Illegal NULL params"); 00903 // 00904 // if (FilterDescription == NULL) 00905 // return; 00906 }
|
|
||||||||||||||||
|
Implemented in ColourContextRGBT, ColourContextCMYK, ColourContextHSVT, and ColourContextGreyT. |
|
||||||||||||
|
Implemented in ColourContextRGBT, ColourContextCMYK, ColourContextHSVT, and ColourContextGreyT. |
|
|
Effectively flushes the caches of all colours currently cached in this ColourContext, so that on the next redraw they will re-convert.
This function is automatically called whenever you change the ColourPlate attached to this context in any way. Scope: Intended as an internal routine; also called by ColourPlate class Should not be called by anyone else
Definition at line 1050 of file colcontx.cpp. 01051 { 01052 // We need to change this context's "MyHandle" so that all cached colours for this 01053 // context are treated as non-cached again, and will be converted correctly for 01054 // the new output filter. 01055 MyHandle = NextColourContextHandle++; 01056 }
|
|
||||||||||||
|
Converts a Colour into this colour context. The converted colour will be supplied from a cache where possible Scope: PRIVATE - for use only by 'friend' rendering classes: OSRenderRegion, GRenderRegion.
Definition at line 788 of file colcontx.h. 00789 { 00790 ENSURE(UsageCount > 0, "Colour context being used when not initialised!"); 00791 ConvertColourInternal(Source, Result); 00792 }
|
|
||||||||||||||||
|
Converts a colour in any arbitrary colour context into this colour context. The converted colour will be supplied from a cache where possible.
Definition at line 781 of file colcontx.cpp. 00784 { 00785 ENSURE(UsageCount > 0, "Colour context being used when not initialised!"); 00786 00787 // This may look like an opportunity for optimisation, but 00788 // ConvertColourBase is actually an inline function 00789 ConvertColourBase(SourceContext, SourceColour, Result); 00790 }
|
|
||||||||||||
|
Converts an indexed colour into this colour context. The converted colour will be supplied from a cache where possible.
Definition at line 699 of file colcontx.cpp. 00700 { 00701 ENSURE(UsageCount > 0, "Colour context being used when not initialised!"); 00702 00703 if (Source->Info.OCContextHandle != MyHandle) // Uncached so convert it into the cache 00704 { 00705 // Ask the colour to get its source colour for us. If this is a Linked/Tint colour, 00706 // this could well involve getting another colour's definition, converting it, and 00707 // generally giving us an extended tour of stack city. 00708 ColourGeneric SourceColour; 00709 Source->GetSourceColour(&SourceColour); 00710 00711 // Check if we're doing a spot colour plate. We either get the colour's source colour, 00712 // or if it shouldn't appear on the plate, we get White. 00713 if (ColPlate != NULL && !ColPlate->IsDisabled()) 00714 { 00715 switch(ColPlate->GetType()) 00716 { 00717 case COLOURPLATE_SPOT: 00718 // If we're doing a spot plate and this isn't a descendant of the spot colour 00719 // then we must eliminate it from this plate. We must also check that it's a "true" 00720 // spot/tint, as opposed to a tint which is really a process colour. 00721 if ((!Source->IsADescendantOf(ColPlate->GetSpotColour())) || 00722 (!Source->IsSpotOrTintOfSpot())) 00723 { 00724 // Fill it with whatever White is defined as in the source context 00725 GetGlobalDefault(Source->GetColourModel())->GetWhite(&SourceColour); 00726 } 00727 break; 00728 00729 case COLOURPLATE_CYAN: 00730 case COLOURPLATE_MAGENTA: 00731 case COLOURPLATE_YELLOW: 00732 case COLOURPLATE_KEY: 00733 // If we're doing a process plate, eliminate any spot colours (or tints) from it 00734 if (Source->IsSpotOrTintOfSpot()) 00735 { 00736 // Fill it with whatever White is defined as in the source context 00737 GetGlobalDefault(Source->GetColourModel())->GetWhite(&SourceColour); 00738 } 00739 break; 00740 default: 00741 break; 00742 } 00743 } 00744 00745 ConvertColourBase(GetGlobalDefault(Source->GetColourModel()), 00746 &SourceColour, &Source->CachedColour, 00747 Source); 00748 00749 Source->Info.OCContextHandle = MyHandle; 00750 Source->Info.CacheColourModel = ColModel; 00751 } 00752 00753 // Copy the result from our cache 00754 memcpy(Result, &Source->CachedColour, sizeof(ColourGeneric)); 00755 }
|
|
||||||||||||
|
Converts a Colour into this colour context. The converted colour will be supplied from a cache where possible.
Definition at line 760 of file colcontx.h. 00761 { 00762 ENSURE(UsageCount > 0, "Colour context being used when not initialised!"); 00763 ConvertColourInternal(Source, Result); 00764 }
|
|
||||||||||||||||||||
|
Converts a Colour into this colour context, from the default colour context implied by the given colour model Post-processing (as described by the attached ColourPlate object) will be applied to generate colour separations (etc) as required.
Result - A ColourGeneric structure to recieve the resulting converted colour, as defined in this ColourContext. SourceIxCol - NULL, or a pointer to the IndexedColour we are converting. This is used only for handling spot colour separations, to determine if the colour is a given spot colour or tint thereof.
Notes: It is up to the caller to update caches etc if necessary This is used as a base on which ConvertColourInternal methods are built ColourContextCMYK overrides this base class method to provide direct passthrough of CMYK colours into a CMYK output context. (passthrough otherwise only occurs if the source & destination contexts are the same object) Scope: private to colcontx.cpp
Reimplemented in ColourContextCMYK. Definition at line 490 of file colcontx.cpp. 00493 { 00494 #ifndef NO_XARACMS 00495 // Last minute bodge for Composite preview of CMYK colours in RGB space 00496 // This is done here cos it's much faster, and gets around pre/post filter problems 00497 // with CMYK colours which aren't IndexedColours (like intermediate blend/gradfill DocColours) 00498 if (ColPlate != NULL && ColPlate->GetType() == COLOURPLATE_COMPOSITE && 00499 GetColourModel() == COLOURMODEL_RGBT && 00500 SourceContext->GetColourModel() == COLOURMODEL_CMYK) 00501 { 00502 // If it's a CMYK colour, then it's already in printer gamut, so we only apply 00503 // the backward colour correction factor to it. 00504 // Note that this means we chuck away the normal colour conversion system! 00505 XaraCMS* lpCMSMan = GetApplication()->GetCMSManager(); 00506 if (lpCMSMan != NULL) 00507 { 00508 ColourCMYK Def; 00509 memcpy(&Def, Source, sizeof(ColourGeneric)); 00510 00511 lpCMSMan->ConvertColourForPaperView(&Def, (ColourRGBT *) Result); 00512 return; 00513 } 00514 } 00515 #endif 00516 00517 // Copy the source colour into a temporary variable 00518 ColourGeneric FilteredSource; 00519 memcpy(&FilteredSource, Source, sizeof(ColourGeneric)); 00520 00521 // Call the SourceContext to allow it to pre-filter the colour. This is used to 00522 // provide colour separations and other doody features when converting CMYK colours 00523 // - when converting non-CMYK colours, this is usually done in the OutputFilter (below) 00524 if (ColPlate != NULL && !ColPlate->IsDisabled()) 00525 SourceContext->ApplyInputFilter(ColPlate, this, &FilteredSource, SourceIxCol); 00526 00527 // ----- 00528 // Call levels expected: 00529 // 1 inline ConvertColour checks if can satisfy from cache 00530 // 2 function ConvertColourInternal does any short cuts it can, such 00531 // as CMYK->CMYK passthrough 00532 // 3 Call ConvertColourBase, which 00533 // a) Checks if in same colour model, and implements passthrough, or 00534 // b) Converts colour properly via CIET space 00535 00536 if (SourceContext == this) 00537 { 00538 // The SourceContext and Destination context are identical, so we can 00539 // just copy the definition directly across. 00540 memcpy(Result, &FilteredSource, sizeof(ColourGeneric)); 00541 } 00542 else 00543 { 00544 DColourCIET IntermediateResult; 00545 00546 SourceContext->ConvertToCIET(&FilteredSource, &IntermediateResult); 00547 ConvertFromCIET(&IntermediateResult, Result); 00548 } 00549 00550 00551 // Call the DestinationContext (derived class of this) to apply any output filtering - 00552 // non-CMYK colour conversions will separate the colour (as appropriate) here 00553 if (ColPlate != NULL && !ColPlate->IsDisabled()) 00554 ApplyOutputFilter(ColPlate, SourceContext, Result, SourceIxCol); 00555 }
|
|
||||||||||||
|
Converts a Colour into this colour context. The converted colour will be supplied from a cache where possible (this check is made by the caller function ConvertColour) Scope: PRIVATE - for use only by 'friend' rendering classes: OSRenderRegion, GRenderRegion.
Definition at line 663 of file colcontx.cpp. 00664 { 00665 ColourGeneric NewResult; 00666 ConvertColourInternal(Source, &NewResult); // Convert 00667 00668 PackColour(&NewResult, Result); // Pack the colour into Result... 00669 00670 if (Source->Info.SourceColourModel != COLOURMODEL_INDEXED) 00671 { 00672 // And (if not an IndexedColour) update the cache 00673 Source->Info.OCContextHandle = MyHandle; 00674 Source->Info.CacheColourModel = ColModel; 00675 memcpy(&Source->CachedColour, Result, sizeof(ColourPacked)); 00676 } 00677 }
|
|
||||||||||||
|
Converts a Colour into this colour context. The converted colour will be supplied from a cache where possible.
Definition at line 581 of file colcontx.cpp. 00582 { 00583 if (Source->Info.SourceColourModel == COLOURMODEL_INDEXED) 00584 { 00585 IndexedColour *SrcIndexed = Source->SourceColour.Indexed.Colour; 00586 00587 // Convert the indexed colour to our context 00588 ConvertColour(SrcIndexed, Result); 00589 00590 // If IndexedColour, we do NOT want the colour cached at the DocColour 00591 // level (else if the IxCol changes, we'd have to search for all related 00592 // DocCols to fix their caches... erg!) 00593 return; 00594 } 00595 00596 // Unpack the 32-bit colour into a 128-bit structure, and then invoke the 00597 // shared internal conversion routine. 00598 ColourGeneric SourceDefn; 00599 00600 // If this DocColour should not be separated (it's a UI colour), then disable 00601 // any active colour plate to stop it separating the output - we'll save and restore 00602 // its previous state around the call to ConvertColourBase 00603 BOOL WasDisabled = TRUE; 00604 if (ColPlate != NULL) 00605 { 00606 WasDisabled = ColPlate->IsDisabled(); 00607 ColPlate->SetDisabled(!Source->IsSeparable()); 00608 } 00609 00610 // Check if we're doing a spot colour plate. We either get the colour's source colour, 00611 // or if it shouldn't appear on the plate, we get White. 00612 if (ColPlate != NULL && !ColPlate->IsDisabled() && ColPlate->GetType() == COLOURPLATE_SPOT) 00613 { 00614 // We're doing a SPOT colour plate, but this colour is a local DocColour, so 00615 // it cannot possibly be a tint on this plate, so we just return white. 00616 GetGlobalDefault(Source->GetColourModel())->GetWhite(&SourceDefn); 00617 } 00618 else 00619 { 00620 // Unpack the colour 00621 GetGlobalDefault(Source->GetColourModel())->UnpackColour(&Source->SourceColour, &SourceDefn); 00622 } 00623 00624 // Assume that the source context is a global default. Generally, this should be true, 00625 // as all source colours should be defined in terms of logical colour models. 00626 ConvertColourBase(GetGlobalDefault(Source->GetColourModel()), 00627 &SourceDefn, Result); 00628 00629 // And restore the previous ColourPlate "disabled" state 00630 if (ColPlate != NULL) 00631 ColPlate->SetDisabled(WasDisabled); 00632 00633 PackColour(Result, &Source->CachedColour); // And update the cache 00634 00635 // Update cache flags - I am the context in which the cache is defined 00636 Source->Info.OCContextHandle = MyHandle; 00637 Source->Info.CacheColourModel = ColModel; 00638 }
|
|
||||||||||||
|
Implemented in ColourContextRGBT, ColourContextCMYK, ColourContextHSVT, and ColourContextGreyT. |
|
||||||||||||
|
Implemented in ColourContextRGBT, ColourContextCMYK, ColourContextHSVT, and ColourContextGreyT. |
|
|
Create an external transform to be used during colour conversions from RGB to the current RCS space. This function uses the Winoil CMS Manager to create the transform. Both forward and backward transforms use logical RGB descriptions.
Reimplemented in ColourContextRGBT, ColourContextCMYK, ColourContextHSVT, and ColourContextGreyT. Definition at line 809 of file colcontx.cpp. 00810 { 00811 // We do nothing here. If no one creates an external transform, the default 00812 // internal one will be used. To create an external transform, call the derived class 00813 // function, not this one as you can see it does nothing. 00814 }
|
|
|
Decrements usage-count for a colour context. This count allows us to determine when we can delete unused contexts.
Definition at line 329 of file colcontx.cpp. 00330 { 00331 ENSURE(UsageCount > 0, "ColourContext::DecrementUsage - Usage count is negative!"); 00332 return((--UsageCount) != 0); 00333 }
|
|
|
|
|
|
Detaches the ColourPlate (if any) currently attached to this ColourContext. The context will no longer use the colour plate descriptor, and will return to default colour separation/correction actions.
Notes: The Context's cache handle will be changed so that all cached colours in this output context are effectively 'flushed'.
Definition at line 981 of file colcontx.cpp. 00982 { 00983 ColourPlate *OldColourPlate = ColPlate; 00984 00985 if (ColPlate != NULL) 00986 { 00987 ColPlate = NULL; 00988 00989 // Change our context handle so that all cached colours in this context 00990 // are effectively "flushed" 00991 ColourPlateHasChanged(); 00992 } 00993 00994 return(OldColourPlate); 00995 }
|
|
|
Determines the colour model on which this colour context is based.
Definition at line 367 of file colcontx.h. 00368 { 00369 return(ColModel); 00370 }
|
|
|
Reads the colour separation/plate for this context.
Definition at line 1016 of file colcontx.cpp. 01017 { 01018 return(ColPlate); 01019 }
|
|
|
Implemented in ColourContextRGBT, ColourContextCMYK, ColourContextHSVT, and ColourContextGreyT. |
|
||||||||||||||||
|
Implemented in ColourContextRGBT, ColourContextCMYK, ColourContextHSVT, and ColourContextGreyT. |
|
|
Provides the UnitGroup of the given component in the ColourModel.
Definition at line 1111 of file colcontx.cpp. 01112 { 01113 ERROR2IF(ComponentID < 1 || ComponentID > GetComponentCount(), FALSE, "Invalid ID"); 01114 UnitGroup** pUnitGroupArray = GetComponentUnitGroups(); 01115 ERROR3IF(!(pUnitGroupArray[ComponentID - 1]->IS_KIND_OF(UnitGroup)), 01116 "ColourContext::GetComponentUnitGroup - Not UnitGroup array"); 01117 01118 return pUnitGroupArray[ComponentID - 1]; 01119 }
|
|
|
Implemented in ColourContextRGBT, ColourContextCMYK, ColourContextHSVT, and ColourContextGreyT. |
|
|
Code used by all renderers to find the current screen output context.
Definition at line 393 of file colcontx.h. 00394 { 00395 Document *Scope = Document::GetSelected(); 00396 00397 if (Scope == NULL) 00398 return((ColourContextRGBT *) GlobalDefaultContext.Context[COLOURMODEL_RGBT]); 00399 else 00400 return((ColourContextRGBT *) 00401 Scope->GetDefaultColourContexts()->Context[COLOURMODEL_RGBT]); 00402 }
|
|
|
Find a default colour context for a given colour model number within GLOBAL scope. This is a static function, so may be called without having to create an actual ColourContext instance.
Definition at line 424 of file colcontx.h. 00425 { 00426 #ifdef DISABLE_WEBRGBT 00427 if (ColModel==COLOURMODEL_WEBRGBT) 00428 ColModel = COLOURMODEL_RGBT; 00429 #endif 00430 ENSURE(ColModel >= 0 && ColModel < MAX_COLOURMODELS, 00431 "ColourContext::GetGlobalDefault - Illegal colour model!"); 00432 00433 ENSURE(GlobalDefaultContext.Context[ColModel |