Topic : The GFA-Basic Compendium Author : GFA Systemtechnik GmbH Version : GFABasic.HYP v2.98 (12/31/2023) Subject : Documentation/Programming Nodes : 899 Index Size : 28056 HCP-Version : 3 Compiled on : Atari @charset : atarist @lang : @default : Document not found @help : Help @options : +g -i -s +z @width : 75 @hostname : STRNGSRV @hostname : CAB @hostname : HIGHWIRE @hostname : THING View Ref-FileGRAPHMODE n n: iexp The command GRAPHMODE determines the way in which graphics is output to the screen with relation to what is already there and is important when pictures are to be drawn on top of one another. Four possible modes can be represented by the numerical expression n: 1 --> Replace 2 --> Transparent 3 --> Xor 4 --> Reverse transparent (inverted and transparent) When 'n' has the value 1, the new drawing is simply drawn over the existing screen contents obliterating it completely. When n is equal to 2, the new drawing is ORed with the existing one, which means that the old picture can still be seen behind the new one. With n equal to 3, the new drawing is XORed with the existing one. This means that, at each pixel where a graphic point was already present, that graphic dot is deleted, and for all other points, the image is drawn normally. The importance of this mode is that the process is reversible. By XORing the new drawing with itself the original screen is restored. Thus, by using this mode, animation is possible by repeated drawing and 'undrawing' of a figure as it is moved around the screen. In the case where n = 4, the new drawing is inverted and then ORed with the existing one. In this way, a display similar to mode 2 is produced (n=2), but the new picture is shown in reverse video. Example: FOR i%=1 TO 4 GRAPHMODE i% DEFFILL 1,3,8 PBOX 150*i%-100,10,150*i*,100 DEFFILL 1,2,10 PBOX 150*i%-140,50,150*i%-40,150 NEXT i% --> Four filled rectangles are drawn, and a further four are drawn partly overlapping the previous ones. Each pair is combined using a different GRAPHMODE setting. Internally calls vswr_mode(). vswr_mode()+