Applies To:
  • CitectSCADA 5.10, 5.20

Summary:
Since upgrading from V4.20 there are some strange anomalies in my graphics pages. In runtime some pages display differently to how they appear in the graphics builder. What changes should I expect on my pages and how should I go about fixing them? 

Solution:
The majority of the following documentation is found in the Upgrade Information topic in the V5.10 and V5.20 Citect On-line help. (Search the index for Upgrade Information and double click on the selection. A topic list will appear - select  "Version 5.10 and later Graphics Compatibility"). 

Version 5.10 Graphics Backward Compatibility

With the introduction of the dynamic page sizing feature into Citect, it was necessary to re-engineer the version 3.4/4.2 animations and related Cicode. Citect remains backward compatible with previous versions, although some issues have resulted from this change:

General Behaviour of 3.4/4.2 Animation Objects

3.4/4.2 animation objects support sizing and movement via the same mechanism as version 5 objects, although you cannot configure them as such in Graphics Builder. This has implications for animations contained within Genies and Symbols. If a Genie or a Symbol is pasted onto a page and sized and/or rotated, then any version 3.4/4.2 animations contained within the Symbol or Genie definition will have the same sizing and/or rotation applied to it. This is not the case in versions 5.00 and 5.01. In these versions, only the object hot spots were affected and not the objects themselves. This also applies to pure animation points and Cicode animations. In these two cases any object displayed at those points via a Cicode function call will display the object sized and rotated accordingly. When the page is resized in runtime, all animations will size accordingly.

Cicode Function Implications

Cicode functions such as DspAnNew() and DspGetMouse() take and return screen coordinates in Cicode. What happens when the page is resized? Say, for example, that the page is dynamically sized in runtime to half height and width of the normal page size. Then if you call DspAnNew(100,200), Citect will create the Cicode animation at that point, but will display any animations placed on it at (50,100) - since the page is at half scale. Any Cicode function returning a screen coordinate will map the coordinates in a converse fashion.

In the above example, if the mouse is positioned over the new animation point and we call DspGetMouse(X,Y), X will be set to 100 and Y to 200. In general, then, all coordinates that you use in Cicode for display related functions correspond to the logical coordinates of the page and not the physical screen coordinates. In this way the Cicode behaviour should be consistent across all resolutions the page is sized to. If you have used coordinates from DspGetMouse(), on the assumption that these coordinates are physical page coordinates, then your Cicode will behave inconsistently under resized page conditions.

NOTE: Note that due to round-off error there will be small errors in reported object positions and extents under resized page conditions, particularly if the page is made smaller. This is normal behaviour.

Citect Buttons

As pages can now be dynamically sized, it was necessary to make the text and Symbols within buttons resize with the button. This behaviour is new to Version 5.10 whereas versions 5.00 and 5.01 always displayed the button Symbol or button text with the normal size of the Symbol or text. This has implications in the case of buttons in Symbol definitions and/or Genies. Since pasted Symbols and/or Genies can be sized and/or rotated on a page in the Graphics Builder, these changes will be reflected in runtime when the project is run. However, the Graphics Builder at present assumes that runtime cannot do this and will display Symbols and text on buttons as per version 5.00. And, you may notice a discrepancy between page appearance in the Graphics Builder and runtime. This issue will be resolved in future releases of Citect.

If the aspect ratio is changed from unity or the button is mirrored, then text quality will be degraded as the text will be drawn using a Windows GDI path rather than as plain text. To avoid this problem, always maintain the aspect ratio of buttons as Genies or Symbols. This only applies to buttons in Symbol definitions or Genies. The same limitation does not apply to buttons on pages or templates. Also, if text on a button uses a font definition that does not use a True Type font, it will not resize with the page when run under Windows 95. To avoid this problem, only use True Type fonts for Citect font definitions. The font definitions in the Citect Include project have been altered to use nearest equivalent True Type fonts.

Predefined Font Changes

Most of the predefined fonts have been changed because they were not a scalable, therefore they were not compatable with Citect's resizable pages functionality. These changes may cause some of your pages to display differently. The following predefined fonts have been changed:

AlmAccOffFont FontOP Pen3SpcFont SpcFont

AlmAccOnFont FontPV Pen3TrendFont TextFont

AlmDisabledFont FontSP Pen4SpcFont TimeFont

AlmUnAccOffFont FontTune Pen4TrendFont TrendFont

AlmUnAccOnFont HardwareFont Pen5TrendFont TrendHistFont

ButtonFont Pen1SpcFont Pen6TrendFont UnacceptedFont

Casanova Pen1TrendFont Pen7TrendFont Vanuatu

DefaultFont Pen2SpcFont Pen8TrendFont System

DisabledFont Pen2TrendFont PromptFont

Text and Number Animations

Text animations suffer the same problems as buttons with regard to text in Genies and Symbol definitions. That is, when the aspect ratio is altered or the Genie/Symbol is mirrored, the text display will be of a degraded quality in runtime. Also, if the Citect font used in the object does not use a True Type font, the text will not resize when run under Windows 95.

Citect Fonts

To correctly support dynamic sizing of pages and multi-language projects, the font definitions in the Citect Include project have been altered to use True Type fonts only. The fonts where chosen on a nearest equivalent basis but as the match is not exact you may note a difference in the visual appearance of projects.

DspAnMove() and DspAnMoveRel()

The DspAnMove() and DspAnMoveRel() Cicode functions behave differently (in special circumstances) in this version when comparded to versions 5.00 and 5.01. The physical location of the hot spot for a Cicode or pure AN object is as it is shown in Graphics builder. However, when a Symbol animation is displayed at that point, the animation hot spot is effectively moved by the hot spot of the Symbol itself. When the Symbol animation is deleted the hot spot returns to its former position. The net effect of this is that calling DspAnMoveRel() on a pure animation and the same pure animation with a Symbol displayed, can potentially result in different movement. This is in contrast with version 5.00 and 5.01 in which the movement will be the same. Also, if DspAnMove() and DspAnMoveRel() are used to move a slider object, the slider will only be moved by the specified amount in the non-sliding direction. This occurs because the slider itself will override any movement imposed by the DspAnMove() or DspAnMoveRel(). In version 5.00 and 5.01 DspAnMove() moved the slider without exception. Furthermore, pure animations and advanced animations that have no viewable object displayed at that point will always report the animation point position as if the page scale was unity irrespective of how the page is resized. This means that if you use DspAnNewRel() or DspAnMoveRel() with a pure animation for the reference point, then the new animation point position will be inconsistent under re-sized page conditions. To avoid this problem, always make sure that something is displayed at the reference animation point. If you do not want anything to be visible at that point, use DspText() to display an empty string.

NOTE: The DspAnMove() and DspAnMoveRel() will work on any graphics object in version 5.10, whereas they only worked with 3.4/4.2 animation objects in previous versions.

Hot Spots

Interpretation of animation hot spots for version 3.4/4.2 animation objects did not work for Buttons and Symbols in version 5.00 and version 5.01. Version 5.10 fixes this inconsistency with earlier versions of Citect. If you have developed a project in version 5.00 or 5.01 that places button or Symbol animations onto a page via Cicode, you may find that the objects no longer appear where originally intended. Your project will require re-engineering to fix such problems.

Colour Floods

Colour flood objects can cause problems in a project making use of resizeable pages. If your project makes use of colour floods on small or narrow objects and the hot spot of the colour flood is close to the flooding border, it is possible that (under a resized condition) the flood will appear on the flooding border rather than inside the flooding border. This problem occurs because of round off error and, under this circumstance, will result in the flood spilling out onto the page. With fast runtime display in force, the flood border may become aggregated into the fast runtime bitmap (page background) which, when resized, may develop breaks in the boundary which again will allow the flood to leak out. To avoid this problem, stop the flood boundary object from becoming aggregated into the fast runtime bitmap. You can do this by setting a Cicode expression in the Colour Flood Appearance/Visibility tab to FALSE.

NOTE: If you still have a flood leakage problem caused by hot spot round off you will need to re-engineer your project.

Version 5 colour flood animations have supported strict z ordering. As such, you may find that an upgraded project from version 3.4/4.2 has colour floods that leak out onto the page because of incorrect z ordering. For example, on a new page if you were to draw a colour flood and then draw the flooding border around the colour flood, this page, when run, would flood the entire page. This occurs because the flood is at the bottom on the z-order and is drawn before the flooding border. To make the colour flood behave as expected the colour flood must appear immediately above the flooding boundary in z order. You may need to alter the z order of colour flood animations to obtain the desired behaviour.

Unsupported Behaviour

A great deal of effort has been put into providing backward compatibility, however, some functionality has been deliberately left unsupported. This includes the inverted text cursor (controlled by the [AnmCursor]InvertText parameter) and the PART_GRAY disable mode for the DspGrayButton() Cicode function. PART_GRAY is no longer supported and is mapped to ALL_GRAY. However, this function now works with any animation type and not just Cicode buttons. This encompasses all known unsupported behaviour, however, there may be other unsupported behaviour not documented here. If you should find behavioural peculiarities not discussed here, please contact Citect Support.

Another upgrade issue which may affect your project is with Citect palettes. On upgrading to V5.10 or V5.20 you may find that your Citect.pal becomes corrupted. ie your page background, symbols and objects may have changed colour. For example a user defined colour may now have been approximated by a flashing colour. This is more common when you have created User Defined colours in your V3/4 palette. The problem occurs because the Citect palette has increased in size to 256 colours, so the upgrade mapping is no longer one to one. Try setting the parameter [CtEdit]UpgradeDither=0 in the Citect.ini file, and then restore the V3/4 project. Shutdown the Citect Explorer and restart it. After upgrading of graphics pages the palettes should now align.

 

Keywords:
 

Attachments