Painting Outlined Areas-The Paint Command - Commodore 128 System Manual

Table of Contents

Advertisement

The DRAW statement also has a third form.
You can DRAW one point at a time by specifying the starting X
and Y values as follows:
150 DRAW 1,160,160
This statement DRAWS a dot below the CIRCLE.
As you can see, the DRAW statement has versatile features
which give you the capability to create shapes, lines, points and a
virtually unlimited number of computer drawings on your screen.
PAINTing Outlined Areas—The PAINT Command
The DRAW statement allows you to outline areas on the screen.
What if you want to fill areas within your drawn lines? That's
where the PAINT statement comes in. The PAINT statement does
exactly what the name implies—it fills in, or PAINTs, outlined
areas with color. Just as a painter covers a canvas with paint, the
PAINT statement covers the areas of the screen with one of 16
colors. For example, type:
160 PAINT 1,150,97
Line 160 PAINTS the circle you have drawn in line 60. The PAINT
statement fills a defined area until a specified boundary is
detected according to which source is indicated. When the
Commodore 128 finishes PAINTing, it leaves the pixel cursor at
the point where PAINTing began (in this case, at point 150,97).
Here are two more PAINT statements
180 PAINT 1,50,25
200 PAINT 1,225,125
Line 180 PAINTS the triangle and line 200 PAINTS the empty
box.
* IMPORTANT PAINTING TIP: If you choose a starting
point in your PAINT statement which is already colored from
the same source, Commodore 128 will not PAINT the area.
You must choose a starting point which is entirely inside the
boundary of the shape you want to PAINT. The starting point
cannot be on the boundary line of a pixel that is colored from
the same source. If you specify a PAINT coordinate that is
the same color you are PAINTing with, nothing happens.
6-11

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

128d

Table of Contents