procedure SetColorEx

Top  Previous  Next

Using the method SetColorEx you can force the engine to use a certain color for either the lines, the filling or the fonts. The color is valid until you use SetColorEx( xxx, wpStandardColor ) with xxx beeing a value out of wpFontColor, wpPenColor, wpFillColor.

 

Parameters:

 

Select :  TSetColorExSelect;

 

wpFontColor - select the font color (Canvas.Font.Color)

wpPenColor - select the line color (Canvas.Pen.Color)

wpFillColor - select the fill color (Canvas.Brush.Color)

 

Mode : TSetColorExMode;

 

wpStandardColor - disables the special color

wpRGBMode - select a RGB color

wpCMYKMode - select CMYK

wpGrayMode - select grayscale

 

RC: Single = 0

 

Select either Red in RGB mode or Cyan in CMYK. In Grayscale it should be 0.

 

GM: Single = 0;

 

Select either Green in RGB mode or Magenta in CMYK. In Grayscale it should be 0.

 

BY: Single = 0

 

Select either Blue in RGB mode or Yellow in CMYK. In Grayscale it should be 0.

 

K: Single = 0

 

Select either Black CMYK or  the grayscale value. In RGB mode it should be 0.

 

Example:

 

      WPPDFPrinter1.SetColorEx(wpPenColor, wpCMYKMode,

        00.6010.55  );

 

      WPPDFPrinter1.SetColorEx(wpFillColor, wpCMYKMode,

        00.6010.55  );

 

      WPPDFPrinter1.Canvas.Brush.Style := bsClear;

 

      WPPDFPrinter1.Canvas.Rectangle( 100200300400);

 

      WPPDFPrinter1.Canvas.Brush.Style := bsSolid;

 

      WPPDFPrinter1.Canvas.Rectangle( 500500700700);

 

      WPPDFPrinter1.SetColorEx(wpPenColor, wpStandardColor );