PLACE

From Liberty BASIC Family
Jump to navigation Jump to search
Supported in Just BASIC Supported in Liberty BASIC Not supported in Liberty BASIC 5 Not supported in Run BASIC

Description

In a graphics window or graphic-box, PLACE positions the pen at x y. When the pen is moved using place, no line is drawn even if the pen is down.
A similar command, goto also moves the pen but does draw a line when the pen is down.

Syntax

This command is NOT case sensitive.

Using literal values:
  1. #handle "place 100 100" - in graphics window
  2. #handle.ext "place 100 100" - in graphicbox
Using variable values:
  1. #handle "place "; x; " "; y
  2. #handle.ext "place "; x; " "; y
x y are horizontal and vert coordinates from upper left corner of window.

Hints

Here is a list of commands that affect the pen position or status:

Example

An example of the command in a graphics window.

nomainwin
    WindowWidth=400
    WindowHeight=300

    open "Command Demo" for graphics_nsb_nf as #g
    #g "trapclose [quit]"

    'put pen down
    #g "down"
    'place pen at x=100 and y=100 and draw a box
    x=100 : y=100
    #g "place "; x; " "; y
    #g "box 150 150"
    wait

[quit]
    close #g
    end

An example of the command in a graphicbox.

nomainwin
    WindowWidth=400
    WindowHeight=300

    graphicbox #g.gb 2, 2, 390, 270
    open "Command Demo" for window_nf as #g
    #g "trapclose [quit]"

    'put pen down
    #g.gb "down"
    'place pen
    #g.gb "place 100 100"
    #g.gb "box 150 150"
    #g.gb "\\Pen placed at 100 100"
    wait

[quit]
    close #g
    end


Useful Procedures

' Place a useful function or sub using this keyword here