Preset Command

Purpose

Sets a graphic point using the background color.

Syntax

Preset x, y [, color]

Preset [Step] (x, y) [, color]

x, y:Single exp
color:iexp

Description

Preset x, y, color sets a graphic point at the coordinates x and y in color color. When color is omitted the current background color is used. Preset can be used as an alternative to:

Color ,RGB(r, g, b) : Plot x, y

however, Preset will not change the current background color.

Preset x, y or Preset(x, y) sets a point in the current foreground color.

Preset Step (x, y) sets a point in the current background color at a distance of x, y from the current position.

Preset Step (x, y), color sets a point in the color at a distance of x, y from the current position.

Example

OpenW # 1

Do

DoEvents

Preset Rand(_X), Rand(_Y), Rand(_C) - 1

Until MouseK %& 2

CloseW # 1

Cls

Color RGB(0, 0, 0), RGB(255, 0, 0)

Do

DoEvents

Preset Rand(_X), Rand(_Y)

Until MouseK = 1

CloseW 1

Fills the screen slowly with many multicolored points. The second part fills it with red points.

Remarks

Pset sets a point, Preset wipes it

See Also

Color, Plot, Draw, Line, SetDraw, Pset, Point, PTst

{Created by Sjouke Hamstra; Last updated: 21/10/2014 by James Gaite}