Difference between revisions of "DISPLAY"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
imported>Stylin
(updated to new blueprint)
Line 1: Line 1:
'''_DISPLAY''' turns off the automatic display of the screen graphics (which is at around 30 fps) while displaying the screen graphics.  
The {{KW|_DISPLAY}} statement turns off the automatic display of the screen graphics (which is at around 30 fps) while displaying the screen graphics.  




 
{{PageSyntax}}
:::::::''Syntax:'' _DISPLAY
:<code>{{KW|_DISPLAY}}</code>
 




{{PageDescription}}
* '''_DISPLAY''' turns off the default [[_AUTODISPLAY]] when used.
* '''_DISPLAY''' turns off the default [[_AUTODISPLAY]] when used.
* Call _DISPLAY each time the screen graphics are to be displayed.  
* Call _DISPLAY each time the screen graphics are to be displayed.  
Line 12: Line 12:




 
{{PageExamples}}
''Example:''
{{CodeStart}}[[SCREEN]] 13, 0, 1, 0
 
dx = 1: dy = 1
:[[SCREEN]] 13, 0, 1, 0
[[DO]]
:dx = 1: dy = 1
    [[PCOPY]] 1,0
:[[DO]]
    [[CLS]]
:[[PCOPY]] 1,0
    [[_LIMIT]] 60 ' set to 60 frames per second
:[[CLS]]
    x = x + dx: y = y + dy
:[[_LIMIT]] 60 ' set to 60 frames per second
    [[IF...THEN|IF]] x < 0 [[OR]] x > 320 [[THEN]] dx = -dx
:x = x + dx: y = y + dy
    [[IF...THEN|IF]] y < 0 [[OR]] y > 200 [[THEN]] dy = -dy
:[[IF...THEN|IF]] x < 0 [[OR]] x > 320 [[THEN]] dx = -dx
    [[CIRCLE]] (x, y), 10, 15
:[[IF...THEN|IF]] y < 0 [[OR]] y > 200 [[THEN]] dy = -dy
    _DISPLAY
:[[CIRCLE]] (x, y), 10, 15
[[LOOP]] [[UNTIL]] [[INKEY$]] = [[CHR$]](27)
:'''_DISPLAY'''
{{CodeEnd}}
:[[LOOP]] [[UNTIL]] [[INKEY$]] = [[CHR$]](27)
:Displays a circle going around the screen at 60 frames per second, displaying each frame to the screen.
 
 
''Returns:''
 
Displays a circle going around the screen at 60 frames per second, displaying each frame to the screen.
 
 
 
''See also:'' [[_AUTODISPLAY]]
 
 




==Navigation:==
{{PageSeeAlso}}
* {{KW|_AUTODISPLAY}}


[[Keyword_Reference_-_Alphabetical|Go to Keyword Reference - Alphabetical]]


[[Keyword Reference - By usage|Go to Keyword Reference - By usage]]
{{PageNavigation}}

Revision as of 19:25, 15 January 2010

The _DISPLAY statement turns off the automatic display of the screen graphics (which is at around 30 fps) while displaying the screen graphics.


Syntax

_DISPLAY


Description

  • _DISPLAY turns off the default _AUTODISPLAY when used.
  • Call _DISPLAY each time the screen graphics are to be displayed.
  • Re-enable the automatic display by calling _AUTODISPLAY.


Examples

SCREEN 13, 0, 1, 0 dx = 1: dy = 1 DO PCOPY 1,0 CLS _LIMIT 60 ' set to 60 frames per second x = x + dx: y = y + dy IF x < 0 OR x > 320 THEN dx = -dx IF y < 0 OR y > 200 THEN dy = -dy CIRCLE (x, y), 10, 15 _DISPLAY LOOP UNTIL INKEY$ = CHR$(27)

Displays a circle going around the screen at 60 frames per second, displaying each frame to the screen.


See also



Navigation:
Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page