This is an old revision of the document!

XOR mode

In some Applications the display content is altered at a high rate. If a background image is used, the update rate is too slow if the whole screen is redrawn on each iteration. In these cases the XOR mode can be a solution. XOR mode can be used to draw reversible or movable objects such as cursors graphs indicators etc.
XOR mode is available with th efolowing functions:

  • point
  • line
  • continue line
  • polygon
  • rectangle

When a color different to the default value 1) is wired to the bg color terminal the line will be drawn in XOR mode. The point or line will be drawn in the desired color as long as the pixel that will be overwritten maches the given bg color. When the line is drawn twice withe the same settings, it will disappear.
You can draw multiple XOR objects that overlap each other (eg multiple lines in one graph window). All XOR objects can be removed from the display by drawing them twice regardless of the sequence they have been drawn.

1) The color value to disable the XOR mode is 1. You can edit the value of a color constant by clicking on it and then clicking on the palette symbol of the lower right corner of the dialog that appears. If you enter 0 for the red and the green value and 1 for the blue value you get constant needed to disable the XOR mode.
please note, that the default value for the draw point vi is 0 and not 1 therefore XOR mode is not disabled when the control is left open or wired with the default value.

xor_mode.1427282727.txt.gz · Last modified: 2017/11/07 21:26 (external edit)
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki