Applies To:
  • CitectSCADA 3.xx, 4.xx, 5.xx

WinCopy() and WinFile() have been enhanced to take the specified x/y scales and palette.  These functions now have arguments as follows - WinCopy(xScale, yScale, sPalette) and WinFile(Filename, xScale, yScale, sPalette).

The sPalette parameter will be similar to the sPalette parameter of WinPrintFile() or WinPrint().  Also, the xScale and yScale parameters should be greater than 0.  Moreover, in order to get the original size, the xScale and yScale parameters have to be set to 1.  The functions will return 0 (zero) if successful, otherwise an error is returned.

Note: When using both scaling and a different palette you may not get desired results.  This is because a pixel averaging algorithm is used when scaling down.  This may choose colours near the colour you are mapping and thus will not be mapped by a single colour map.  You can adjust the palette to include these colours or turn pixel averaging off by setting [Animator]UsePixelAveraging=0.


This enhancement has been included in version 5.21 Service Pack A.  To facilitate this change the cicode functions WinCopy() nad WinFile() are now label macros to the internal functions _WinCopy() and _WinFIle().  Therefore if you wish to call WinCopy() or WinFile() from the kernel you need to use _WinCopy() and _WinFile().  Also, as per usual when calling functions form the kernel, you need to specify all parameters.