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 ZB.lcd.draw.point.vi
  • line ZB.lcd.draw.line.vi
  • continue line ZB.lcd.draw.linealong.vi
  • polygon ZB.lcd.drawpolygon.vi
  • rectangle ZB.lcd.draw.rectangle.vi

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.
pallete
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.txt · Last modified: 2017/11/07 22:26 by 127.0.0.1
 
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