ColourPlate Class Reference

The ColourPlate class is used as a descriptor defining how a colour context should separate/filter a colour as it is converted. More...

#include <colplate.h>

Inheritance diagram for ColourPlate:

ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 ColourPlate ()
 Construct ColourPlate descriptions.
virtual ~ColourPlate ()
 Er... damn. It was on the tip of my tongue...
 ColourPlate (ColourPlateType TheType, BOOL MonochromePlate=FALSE, BOOL NegatePlate=FALSE)
 ColourPlate (IndexedColour *SpotColour, BOOL MonochromePlate=FALSE, BOOL NegatePlate=FALSE)
 ColourPlate (const ColourPlate &Other)
ColourPlateoperator= (const ColourPlate &Other)
 ColourPlate assignment operator.
void GetDescription (StringBase *Description)
 To retrieve a textual description of this colour plate (e.g. "Cyan" "Gold (Spot)").
void GetDisplayColour (DocColour *Colour)
 To retrieve a suitable user-interface display colour for this plate. For a spot plate, this is simply the spot colour itself. For the process plates, a suitable colour will be returned.
BOOL IsDisabled (void)
ColourPlateType GetType (void)
IndexedColourGetSpotColour (void)
BOOL IsMonochrome (void)
BOOL IsNegative (void)
double GetScreenAngle (void)
double GetScreenFrequency (void)
ScreenType GetScreenFunction (void)
BOOL ActiveScreening (void)
BOOL Overprints (void)
void SetDisabled (BOOL IsDisabled=TRUE)
 Internally, some colour conversions need to turn of colour separations. (e.g. user-interface colours such as dialogue greys and EOR colours).
void SetPlateInfo (ColourContext *Parent, ColourPlateType TheType, BOOL MonochromePlate=FALSE, BOOL NegatePlate=FALSE)
 Change this ColourPlate description.
void SetPlateInfo (ColourContext *Parent, IndexedColour *SpotColour, BOOL MonochromePlate=FALSE, BOOL NegatePlate=FALSE)
void SetType (ColourContext *Parent, ColourPlateType TheType, IndexedColour *SpotColour=NULL)
 Change this ColourPlate description.
void SetScreenInfo (double Angle, double Frequency)
 Set new screen angle/frequency settings.
void SetScreenFunction (ScreenType func)
 Set a new screen function in this plate.
void SetActiveScreening (BOOL On=TRUE)
 This function indicates whether the screen function, angle and frequency described in this plate should be used when rendering to EPS devices.
void SetOverprint (BOOL On=TRUE)
 Sets this plate to overprint or knock-out.
void SetMonochrome (ColourContext *Parent, BOOL On=TRUE)
 Change this ColourPlate description.
void SetNegative (ColourContext *Parent, BOOL On=TRUE)
 Change this ColourPlate description.
void ResetScreenToDefaults (INT32 DeviceDPI=1200, INT32 DefaultFrequency=60)
 Resets this ColourPlate's screen angle to the recommended angle for its current Screen frequency (lpi) and the current output device resolution.

Protected Member Functions

void InitObject (ColourPlateType NewType)
 Sets this colour plate to the given type, and then initialises ALL member variables to suitable defautls for that type.

Protected Attributes

BOOL Disabled
ColourPlateType Type
DocColour Spot
double ScreenAngle
double ScreenFrequency
BOOL Overprint
BOOL Monochrome
BOOL Negate
BOOL ActiveScreens
ScreenType ScreenFunction

Private Member Functions

 CC_DECLARE_DYNCREATE (ColourPlate)

Detailed Description

The ColourPlate class is used as a descriptor defining how a colour context should separate/filter a colour as it is converted.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com> Date: 20/12/95
The ColourPlate indicates what type of separation plate is required, e.g none, cyan, or spot. In the case of a spot plate, the ColourPlate also retains a pointer to the spot colour for which a plate is required.

A flag is available, Negate, which controls if a normal or "photographic negative" plate is required.

Notes: You can't change a colour plate "on the fly", as you must attach a new one to a colour context in order to make caching of colours work correctly. Thus, to change the plate, you must build a new one.

See also:
ColourContext::SetColourPlate

Definition at line 177 of file colplate.h.


Constructor & Destructor Documentation

ColourPlate::ColourPlate  ) 
 

Construct ColourPlate descriptions.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com> Date: 20/12/95
Parameters:
TheType - Describes what kind of colour plate you want [INPUTS]
SpotColour - Indicates that this is a spot plate, and which colour is to be treated as the spot colour for output. Only this colour and its descendants will be output on the plate.

Monochrome - if TRUE, all output on the plate will be monochromatic (greyscale). If FALSE then the plate may contain colour (i.e. a Cyan plate can be output in greyscales (e.g. for printer output) or in shades of cyan (e.g. for screen))

Negate - if TRUE, all output will be negated to give a photographic negative of the plate. if FALSE, the output will be left alone.

Other - Another ColourPlate you want to copy

Notes: The default constructor makes a simple COLOURPLATE_NONE plate

Returns:
Errors: ERROR3 reports will occur if you do something stupid
See also:
ColourContext

Definition at line 207 of file colplate.cpp.

00208 {
00209     InitObject(COLOURPLATE_NONE);
00210 }

ColourPlate::~ColourPlate  )  [virtual]
 

Er... damn. It was on the tip of my tongue...

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com> Date: 20/12/95

Definition at line 300 of file colplate.cpp.

00301 {
00302 }

ColourPlate::ColourPlate ColourPlateType  TheType,
BOOL  MonochromePlate = FALSE,
BOOL  NegatePlate = FALSE
 

Definition at line 214 of file colplate.cpp.

00215 {
00216     ERROR3IF(TheType == COLOURPLATE_SPOT, "Spot plates must be constructed with the Spot Colour constructor");
00217 
00218     InitObject(TheType);
00219 
00220     // And override the defaults with the supplied settings
00221     Monochrome      = MonochromePlate;
00222     Negate          = NegatePlate;
00223 }

ColourPlate::ColourPlate IndexedColour SpotColour,
BOOL  MonochromePlate = FALSE,
BOOL  NegatePlate = FALSE
 

Definition at line 227 of file colplate.cpp.

00228 {
00229     ERROR3IF(SpotColour == NULL, "Spot plates must include a valid Spot Colour!");
00230 
00231     InitObject(COLOURPLATE_SPOT);
00232 
00233     // And override the defaults with the supplied settings
00234     Monochrome      = MonochromePlate;
00235     Negate          = NegatePlate;
00236 
00237     Spot.MakeRefToIndexedColour(SpotColour);
00238 }

ColourPlate::ColourPlate const ColourPlate Other  ) 
 

Definition at line 242 of file colplate.cpp.

00243 {
00244     Disabled        = Other.Disabled;
00245     Type            = Other.Type;
00246     Overprint       = Other.Overprint;
00247     Monochrome      = Other.Monochrome;
00248     Negate          = Other.Negate;
00249     ActiveScreens   = Other.ActiveScreens;
00250     Spot            = Other.Spot;
00251 
00252     ScreenAngle     = Other.ScreenAngle;
00253     ScreenFrequency = Other.ScreenFrequency;
00254     ScreenFunction  = Other.ScreenFunction;
00255 }


Member Function Documentation

BOOL ColourPlate::ActiveScreening void   )  [inline]
 

Definition at line 228 of file colplate.h.

00228 { return(ActiveScreens); };

ColourPlate::CC_DECLARE_DYNCREATE ColourPlate   )  [private]
 

void ColourPlate::GetDescription StringBase Description  ) 
 

To retrieve a textual description of this colour plate (e.g. "Cyan" "Gold (Spot)").

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com> Date: 13/6/96
Parameters:
On return, the Description string will contain a description of this [OUTPUTS] colour plate. The string should be more than 64 characters in length, or the result could be truncated.

Definition at line 322 of file colplate.cpp.

00323 {
00324     ERROR3IF(Description == NULL, "Illegal NULL param");
00325     *Description = TEXT("");
00326 
00327     switch(GetType())
00328     {
00329         case COLOURPLATE_CYAN:
00330             Description->MakeMsg(_R(IDS_COLOURPLATE_CYAN));
00331             break;
00332 
00333         case COLOURPLATE_MAGENTA:
00334             Description->MakeMsg(_R(IDS_COLOURPLATE_MAGENTA));
00335             break;
00336 
00337         case COLOURPLATE_YELLOW:
00338             Description->MakeMsg(_R(IDS_COLOURPLATE_YELLOW));
00339             break;
00340 
00341         case COLOURPLATE_KEY:
00342             Description->MakeMsg(_R(IDS_COLOURPLATE_BLACK));
00343             break;
00344 
00345         case COLOURPLATE_SPOT:
00346             {
00347                 IndexedColour *Col = GetSpotColour();
00348                 ERROR3IF(Col == NULL, "NULL Spot colour in spot plate");
00349 
00350                 Description->MakeMsg(_R(IDS_COLOURPLATE_SPOT), (TCHAR *) *(Col->GetName()) );
00351             }
00352             break;
00353         default:
00354             break;
00355     }
00356 }

void ColourPlate::GetDisplayColour DocColour Colour  ) 
 

To retrieve a suitable user-interface display colour for this plate. For a spot plate, this is simply the spot colour itself. For the process plates, a suitable colour will be returned.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com> Date: 24/6/96
Parameters:
On return, the Colour parameter will be filled in with an appropriate colour [OUTPUTS]

Definition at line 375 of file colplate.cpp.

00376 {
00377     ERROR3IF(Colour == NULL, "Illegal NULL param");
00378 
00379     PColourCMYK CMYKDef;
00380     CMYKDef.Cyan = CMYKDef.Magenta = CMYKDef.Yellow = CMYKDef.Key = 0;
00381 
00382     switch(GetType())
00383     {
00384         case COLOURPLATE_CYAN:      CMYKDef.Cyan = 255;     break;
00385         case COLOURPLATE_MAGENTA:   CMYKDef.Magenta = 255;  break;
00386         case COLOURPLATE_YELLOW:    CMYKDef.Yellow = 255;   break;
00387         case COLOURPLATE_KEY:       CMYKDef.Key = 255;      break;
00388 
00389         case COLOURPLATE_SPOT:
00390             {
00391                 IndexedColour *Col = GetSpotColour();
00392                 ERROR3IF(Col == NULL, "NULL Spot colour in spot plate");
00393 
00394                 Colour->MakeRefToIndexedColour(Col);
00395                 return;     // Return immediately
00396             }
00397             break;
00398 
00399         default:
00400             // Just leave it alone, which will return the default value - white
00401             break;
00402     }
00403 
00404     // If we've dropped through this far, then set the CMYK value we've
00405     // filled in, and return
00406     Colour->SetCMYKValue(&CMYKDef);
00407 }

double ColourPlate::GetScreenAngle void   )  [inline]
 

Definition at line 219 of file colplate.h.

00219 { return(ScreenAngle); };

double ColourPlate::GetScreenFrequency void   )  [inline]
 

Definition at line 222 of file colplate.h.

00222 { return(ScreenFrequency); };

ScreenType ColourPlate::GetScreenFunction void   )  [inline]
 

Definition at line 225 of file colplate.h.

00225 { return(ScreenFunction); };

IndexedColour* ColourPlate::GetSpotColour void   )  [inline]
 

Definition at line 208 of file colplate.h.

00209     {
00210         return(Spot.FindParentIndexedColour()); 
00211     };

ColourPlateType ColourPlate::GetType void   )  [inline]
 

Definition at line 205 of file colplate.h.

00205 { return(Type); };

void ColourPlate::InitObject ColourPlateType  NewType  )  [protected]
 

Sets this colour plate to the given type, and then initialises ALL member variables to suitable defautls for that type.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com> Date: 25/6/96
Parameters:
TheType - Describes what kind of colour plate you want [INPUTS]
Used by all the constructors to share code for initialisation.

Notes: Does not check the validity of the arguments (i.e. if you ask for COLOURPLATE_SPOT, does not check that the SpotColour is set up)

Definition at line 138 of file colplate.cpp.

00139 {
00140     Disabled        = FALSE;
00141 
00142     Type            = NewType;
00143 
00144     Overprint       = FALSE;
00145     Monochrome      = TRUE;
00146     Negate          = FALSE;
00147     ActiveScreens   = FALSE;
00148 
00149     ScreenFunction  = SCRTYPE_NONE;     // represents no setscreen command output
00150 
00151     // And set up a suitable default for screen angle/frequency
00152     // Use the selected document's printer resolution and LPI defaults
00153     INT32 DPI   = 1200;     // Defaults in case of catastrophy
00154     INT32 LPI   = 60;
00155     
00156 #if !defined(EXCLUDE_FROM_RALPH) && !defined(EXCLUDE_FROM_XARALX)
00157     TypesetInfo *TPInfo = TypesetInfo::FindTypesetInfoForDoc();
00158     if (TPInfo != NULL)
00159     {
00160         DPI = TPInfo->GetPrintResolution();
00161         LPI = (INT32) floor(TPInfo->GetDefaultScreenFrequency());
00162     }
00163 #endif
00164 
00165     ResetScreenToDefaults(DPI, LPI);
00166 }

BOOL ColourPlate::IsDisabled void   )  [inline]
 

Definition at line 202 of file colplate.h.

00202 { return(Disabled); };

BOOL ColourPlate::IsMonochrome void   )  [inline]
 

Definition at line 213 of file colplate.h.

00213 { return(Monochrome); };

BOOL ColourPlate::IsNegative void   )  [inline]
 

Definition at line 216 of file colplate.h.

00216 { return(Negate); };

ColourPlate & ColourPlate::operator= const ColourPlate Other  ) 
 

ColourPlate assignment operator.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com> Date: 13/6//96

Definition at line 270 of file colplate.cpp.

00271 {
00272     Disabled        = Other.Disabled;
00273     Type            = Other.Type;
00274     Overprint       = Other.Overprint;
00275     Monochrome      = Other.Monochrome;
00276     Negate          = Other.Negate;
00277     ActiveScreens   = Other.ActiveScreens;
00278     Spot            = Other.Spot;
00279 
00280     ScreenAngle     = Other.ScreenAngle;
00281     ScreenFrequency = Other.ScreenFrequency;
00282     ScreenFunction  = Other.ScreenFunction;
00283 
00284     return(*this);
00285 }

BOOL ColourPlate::Overprints void   )  [inline]
 

Definition at line 231 of file colplate.h.

00231 { return(Overprint); };

void ColourPlate::ResetScreenToDefaults INT32  DeviceDPI = 1200,
INT32  DefaultFrequency = 60
 

Resets this ColourPlate's screen angle to the recommended angle for its current Screen frequency (lpi) and the current output device resolution.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com> Date: 14/8/96
Parameters:
DeviceDPI - The anticipated resolution of the output (imagesetting) device [INPUTS] DefaultFrequency - The basic screen frequency (LPI) from which to derive the recommended defaults
See also:
ColourPlate::SetScreenInfo

Definition at line 751 of file colplate.cpp.

00752 {
00753 #if !defined(EXCLUDE_FROM_RALPH) && !defined(EXCLUDE_FROM_XARALX)
00754     // Ask the XaraCMS for recommended angles for the current typesetter settings
00755     CMSScreenAngles RecAngles;
00756     XaraCMS* lpCMSMan = GetApplication()->GetCMSManager();
00757 
00758     // Set suitable defaults in case of a problem
00759     RecAngles.cyanfreq = RecAngles.magentafreq =
00760             RecAngles.yellowfreq = RecAngles.keyfreq = DefaultFrequency;
00761 
00762     RecAngles.cyanangle     = 105.0;
00763     RecAngles.magentaangle  = 75.0;
00764     RecAngles.yellowangle   = 90.0;
00765     RecAngles.keyangle      = 45.0;
00766 
00767     if (lpCMSMan != NULL)
00768         lpCMSMan->GetRecommendedAngles(DeviceDPI, DefaultFrequency, &RecAngles);
00769 
00770     // Now set a suitable default screen angle for the type of plate
00771     switch(Type)
00772     {
00773         case COLOURPLATE_CYAN:
00774             ScreenAngle     = RecAngles.cyanangle;
00775             ScreenFrequency = RecAngles.cyanfreq;
00776             break;
00777 
00778         case COLOURPLATE_MAGENTA:
00779             ScreenAngle     = RecAngles.magentaangle;
00780             ScreenFrequency = RecAngles.magentafreq;
00781             break;
00782         
00783         case COLOURPLATE_YELLOW:
00784             ScreenAngle     = RecAngles.yellowangle;
00785             ScreenFrequency = RecAngles.yellowfreq;
00786             break;
00787         
00788         case COLOURPLATE_KEY:
00789             ScreenAngle     = RecAngles.keyangle;
00790             ScreenFrequency = RecAngles.keyfreq;
00791             break;
00792 
00793         default:
00794             ScreenAngle = 45.0;
00795             ScreenFrequency = (double) DefaultFrequency;
00796             break;
00797     }
00798 #endif
00799 }

void ColourPlate::SetActiveScreening BOOL  On = TRUE  ) 
 

This function indicates whether the screen function, angle and frequency described in this plate should be used when rendering to EPS devices.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com> Date: 30/8/96
Parameters:
On - if TRUE, this indicates to internal EPS renderers they need to render using [INPUTS] the specified screening functions in this plate
  • if FALSE, the output device will be unaffected.

Definition at line 708 of file colplate.cpp.

00709 {
00710     ActiveScreens = On;
00711 }

void ColourPlate::SetDisabled BOOL  IsDisabled = TRUE  ) 
 

Internally, some colour conversions need to turn of colour separations. (e.g. user-interface colours such as dialogue greys and EOR colours).

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com> Date: 20/5/96
Parameters:
IsDisabled - TRUE to disable this ColourPlate, FALSE to enable it [INPUTS]
These disable separation by setting this disabling flag - this should only be used in a VERY temporary sense (i.e. around individual calls to ConvertColour).

Notes: ColourPlates always default to being Enabled.

See also:
ColourContext::ConvertColour; ColourContext::ConvertColourBase

Definition at line 433 of file colplate.cpp.

00434 {
00435     Disabled = IsDisabled;
00436 }

void ColourPlate::SetMonochrome ColourContext Parent,
BOOL  On = TRUE
 

Change this ColourPlate description.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com> Date: 20/12/95
Parameters:
Parent - the ColourContext this plate is attached to, or NULL if it is currently [INPUTS] unattached. NOTE that it is vital that you pass the parent context in if it is attached, or colours in that context will remain incorrectly cached indefinitely!
On - if TRUE, all output on the plate will be monochromatic (greyscale). If FALSE then the plate may contain colour (i.e. a Cyan plate can be output in greyscales (e.g. for printer output) or in shades of cyan (e.g. for screen))

Notes: Every time the plate changes, the attached ColourContext must chnage its handle in order to "flush" all cached colours. After 65536 such flushes, it is possible for contexts to start using duplicate handles, so it is preferable that changes are made to plates as infrequently as possible.

See also:
ColourContext

Definition at line 643 of file colplate.cpp.

00644 {
00645     if (Monochrome != On)
00646     {
00647         Monochrome = On;
00648         if (Parent != NULL)
00649             Parent->ColourPlateHasChanged();
00650     }
00651 }

void ColourPlate::SetNegative ColourContext Parent,
BOOL  On = TRUE
 

Change this ColourPlate description.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com> Date: 20/12/95
Parameters:
Parent - the ColourContext this plate is attached to, or NULL if it is currently [INPUTS] unattached. NOTE that it is vital that you pass the parent context in if it is attached, or colours in that context will remain incorrectly cached indefinitely!
On - if TRUE, all output will be negated to give a photographic negative of the plate. if FALSE, the output will be left alone.

Notes: Every time the plate changes, the attached ColourContext must chnage its handle in order to "flush" all cached colours. After 65536 such flushes, it is possible for contexts to start using duplicate handles, so it is preferable that changes are made to plates as infrequently as possible.

See also:
ColourContext

Definition at line 680 of file colplate.cpp.

00681 {
00682     if (Negate != On)
00683     {
00684         Negate = On;
00685         if (Parent != NULL)
00686             Parent->ColourPlateHasChanged();
00687     }
00688 }

void ColourPlate::SetOverprint BOOL  On = TRUE  ) 
 

Sets this plate to overprint or knock-out.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com> Date: 24/6/96
Parameters:
On - TRUE to enable or FALSE to disable overprinting of this plate [INPUTS]

Definition at line 610 of file colplate.cpp.

00611 {
00612     Overprint = On;
00613 }

void ColourPlate::SetPlateInfo ColourContext Parent,
IndexedColour SpotColour,
BOOL  MonochromePlate = FALSE,
BOOL  NegatePlate = FALSE
 

Definition at line 501 of file colplate.cpp.

00503 {
00504     ERROR3IF(SpotColour == NULL, "Spot plates must include a valid Spot Colour!");
00505 
00506     InitObject(COLOURPLATE_SPOT);
00507 
00508     Monochrome  = MonochromePlate;
00509     Negate      = NegatePlate;
00510 
00511     Spot.MakeRefToIndexedColour(SpotColour);
00512 
00513     if (Parent != NULL)
00514         Parent->ColourPlateHasChanged();
00515 }

void ColourPlate::SetPlateInfo ColourContext Parent,
ColourPlateType  TheType,
BOOL  MonochromePlate = FALSE,
BOOL  NegatePlate = FALSE
 

Change this ColourPlate description.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com> Date: 20/12/95
Parameters:
Parent - the ColourContext this plate is attached to, or NULL if it is currently [INPUTS] unattached. NOTE that it is vital that you pass the parent context in if it is attached, or colours in that context will remain incorrectly cached indefinitely!
TheType - Describes what kind of colour plate you want

SpotColour - Indicates that this is a spot plate, and which colour is to be treated as the spot colour for output. Only this colour and its descendants will be output on the plate.

Monochrome - if TRUE, all output on the plate will be monochromatic (greyscale). If FALSE then the plate may contain colour (i.e. a Cyan plate can be output in greyscales (e.g. for printer output) or in shades of cyan (e.g. for screen))

Negate - if TRUE, all output will be negated to give a photographic negative of the plate. if FALSE, the output will be left alone.

Notes: Every time the plate changes, the attached ColourContext must chnage its handle in order to "flush" all cached colours. After 65536 such flushes, it is possible for contexts to start using duplicate handles, so it is preferable that changes are made to plates as infrequently as possible.

ALL ColourPlate settings will be reset when you call this function, i.e. disabled plates will be re-enabled, new default screen angle/frequency values filled in, overprint disabled, etc.

Returns:
Errors: ERROR3 reports will occur if you do something stupid
See also:
ColourContext

Definition at line 484 of file colplate.cpp.

00486 {
00487     ERROR3IF(TheType == COLOURPLATE_SPOT, "Spot plates must be constructed with the Spot Colour constructor");
00488 
00489     InitObject(TheType);
00490 
00491     Monochrome  = MonochromePlate;
00492     Negate      = NegatePlate;
00493 
00494     Spot        = DocColour(COLOUR_BLACK);
00495 
00496     if (Parent != NULL)
00497         Parent->ColourPlateHasChanged();
00498 }

void ColourPlate::SetScreenFunction ScreenType  func  ) 
 

Set a new screen function in this plate.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com> Date: 26/6/96
Parameters:
func = the screen function to use [INPUTS]

Definition at line 725 of file colplate.cpp.

00726 {
00727     ScreenFunction = func;
00728 }

void ColourPlate::SetScreenInfo double  Angle,
double  Frequency
 

Set new screen angle/frequency settings.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com> Date: 24/6/96
Parameters:
Angle - The screen angle to use for screening of this plate [INPUTS] in the range 0..360 degrees Frequency - The screen frequency (lpi) to use for screening of this plate
See also:
ColourPlate::ResetScreenToDefaults

Definition at line 586 of file colplate.cpp.

00587 {
00588     ERROR3IF(Angle < 0.0 || Angle >= 360.0, "Illegal screen angle");
00589     ScreenAngle = Angle;
00590 
00591     ERROR3IF(Frequency < 1.0 || Frequency > 1000.0, "Silly screen frequency");
00592     ScreenFrequency = Frequency;
00593 }

void ColourPlate::SetType ColourContext Parent,
ColourPlateType  TheType,
IndexedColour SpotColour = NULL
 

Change this ColourPlate description.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com> Date: 20/12/95
Parameters:
Parent - the ColourContext this plate is attached to, or NULL if it is currently [INPUTS] unattached. NOTE that it is vital that you pass the parent context in if it is attached, or colours in that context will remain incorrectly cached indefinitely!
TheType - Describes what kind of colour plate you want

SpotColour - NULL, or points to the colour which is to be treated as the spot colour for output. Only this colour and its descendants will be output on the plate. TheType must be COLOURPLATE_SPOT if this is non-NULL.

Notes: Every time the plate changes, the attached ColourContext must chnage its handle in order to "flush" all cached colours. After 65536 such flushes, it is possible for contexts to start using duplicate handles, so it is preferable that changes are made to plates as infrequently as possible.

Returns:
Errors: ERROR3 reports will occur if you do something stupid
See also:
ColourContext

Definition at line 550 of file colplate.cpp.

00551 {
00552     ERROR3IF(TheType == COLOURPLATE_SPOT && SpotColour == NULL,
00553                 "Spot plates must include a valid Spot Colour!");
00554 
00555     if (Type != COLOURPLATE_SPOT || Spot.FindParentIndexedColour() != SpotColour)
00556     {
00557         InitObject(TheType);
00558 
00559         if (SpotColour != NULL)
00560             Spot.MakeRefToIndexedColour(SpotColour);
00561 
00562         if (Parent != NULL)
00563             Parent->ColourPlateHasChanged();
00564     }
00565 }


Member Data Documentation

BOOL ColourPlate::ActiveScreens [protected]
 

Definition at line 296 of file colplate.h.

BOOL ColourPlate::Disabled [protected]
 

Definition at line 281 of file colplate.h.

BOOL ColourPlate::Monochrome [protected]
 

Definition at line 293 of file colplate.h.

BOOL ColourPlate::Negate [protected]
 

Definition at line 295 of file colplate.h.

BOOL ColourPlate::Overprint [protected]
 

Definition at line 292 of file colplate.h.

double ColourPlate::ScreenAngle [protected]
 

Definition at line 289 of file colplate.h.

double ColourPlate::ScreenFrequency [protected]
 

Definition at line 290 of file colplate.h.

ScreenType ColourPlate::ScreenFunction [protected]
 

Definition at line 298 of file colplate.h.

DocColour ColourPlate::Spot [protected]
 

Definition at line 287 of file colplate.h.

ColourPlateType ColourPlate::Type [protected]
 

Definition at line 284 of file colplate.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:53:00 2007 for Camelot by  doxygen 1.4.4