Applies To:
  • CitectSCADA 5.50, 5.50 Service Pack A, 5.50 Service Pack B, 5.50 Service Pack C, 6.10

Summary:
How do I swap two colours on a graphics page for printing or copying?
 

Solution:
As of CitectSCADA version 6.10, two new arguments, fromColour and toColour, were added to the following Cicode functions:

WinPrint()
WinFile()
WinCopy()
WinPrintFile()

For example, WinPrintFile() has changed to the following:

WinPrint(sPort, xScale, yScale, bSwapBlackWhite, fromColour, toColour)

The new arguments are as follows:

fromColour: [Optional]
The colour to change to toColour. This is supplied as an RGB Hex value (0xRRGGBB). This argument is set to -1 by default (no colour change).
toColour: [Optional]
The colour to change fromColour to. This is supplied as an RGB Hex value (0xRRGGBB). This argument is set to -1 by default (no colour change).

Both fromColour and toColour must be supplied for a colour change to happen.

Example

WinPrint("LPT3:",0,0,0);
Prints the active window on printer "LPT3". The print will be scaled to fit the largest possible page area and will retain the orientation of the printer, aspect ratio and colors that are displayed on screen.

WinPrint("LPT3:");
Will print the page as in the first example, but swap black and white on the printout.

WinPrint("LPT3:",0,0,0,0x00FF00,0xFF0000);
will change green to red.

WinPrint("LPT3:",0,0,1,0x00FF00,0xFF0000);
will change green to red and black to white.

The changes and default values are the same across all the above Cicode functions, and are described in detail in the Help file in version 6.10.
 

Keywords:
Colour Swap Print graphics  

Attachments