Retro Rocket OS
BASIC-Powered Operating System
Loading...
Searching...
No Matches
PLOT Keyword
PLOT integer-variable, integer-expression, integer-expression

Draws a previously loaded sprite at the given X,Y position.
The first parameter must be an integer variable holding the sprite handle returned by SPRITELOAD. The sprite is positioned with its top-left corner at (X, Y) in screen pixels.

Remarks
The first argument must be a variable containing a valid sprite handle, not a literal value or expression.
Use the built-in GRAPHICS_WIDTH and GRAPHICS_HEIGHT to place sprites relative to the current screen size.

Example

SPRITELOAD brain,"/images/brainbox.png"
SPRITELOAD background,"/images/computer.jpg"
PLOT background,0,0
PLOT brain,0,0
PLOT brain,GRAPHICS_WIDTH-250,0
PLOT brain,0,GRAPHICS_HEIGHT-250
PLOT brain,1920-250,GRAPHICS_HEIGHT-250

image


Notes

  • Coordinates are in screen pixels; (0,0) is the top-left of the display.
  • Sprites that extend beyond the screen are clipped at the edges.
  • When AUTOFLIP is FALSE, drawn frames become visible only after FLIP.
  • Free sprite resources when no longer needed with SPRITEFREE.

See also:
SPRITELOAD · SPRITEFREE · PLOTQUAD · AUTOFLIP · FLIP