 _________________________________________________________________________
/#########################################################################\
|#####...####..######..######......####...####..#####..##......##......###|
|####.....###..######..########..#####.....###...####..##..######..#######|
|###..###..##..######..########..####..###..##....###..##..######..#######|
|###..###..##..######..########..####..###..##..#...#..##..######......###|
|###.......##..######..########..####.......##..##.....##..######..#######|
|###..###..##..######..########..####..###..##..###....##..######..#######|
|###..###..##...#####...#######..####..###..##..####...##..######..#######|
|###..###..##......##......##......##..###..##..#####..##......##......###|
|#########################################################################|
|####################################################################{RB}#|
|=========================================================================|
|									  |
|		           ----> PRESENTS <----				  |
|									  |
|			EASY AMOS - COMPLETE MANUAL		          |
|								          |
|		     SCANNED AND EDITED BY : RAZOR BLADE		  |
|									  |
|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-|
| 		CALL THE ALLIANCE WORLD HQ -> THE PLACE TO BE             |
|       UNKNOWN PLEASURES --> +44 (0) 823 322 891 --> SYSOP: BARBARIAN    |
|_________________________________________________________________________|


			Chapter 8


			GRAPHICS

"Art is a lie."
(Pablo Picasso, 1958)


Welcome to the artists Chapter.


You are a computer-graphics artist! Your electronic
canvas is 320 pixels wide and 200 pixels high. Your
artist's palette can hold several pots of ink, and there are
over four thousand bottles of different colours waiting
in the art shop. So clear your canvas now with a Cls
command, and get ready to create instant computer
graphics with Easy AMOS.


GRAPHIC COORDINATES
-------------------
Every artist wants to put the right blob of colour at the
right point on the canvas,to make up shapes and patterns.
As a computer artist, you need to know the coordinates
of each available pixel. You should already be familiar
with the idea of x,y-coordinates, and as long as you don't
confuse graphic coordinates with text coordinates all
will be well.

PLOT
----
This is the straightforward command for filling a single
pixel with whatever colour is ready to use on your
electronicbrush. Plota point now, whereveryou choose
on the electronic screen, using any graphic x,y-
coordinates between 0,0 and 319,199 like this:

 Plot 160, lO0

Now give your screen a different coloured pimple. All
you have to do is set the graphic coordinates, then
specify the number of one of your paint pots, and see
what colour is in it. For example:

 Plot 160, 100, 6

Not very exciting is it. Never mind. Try giving the
screen animated bubonic plague! Copy the next routine
exactly, and then run it. It uses a new command called
Rnd, which makes things happen at random.

			-=- 104 -=-


Don't worry how that works for now, put your trust in
Easy AMOS and take it for granted that paint pots
numbered from zero to 15 are to be used for throwing
colour all over the screen at random. Here goes:

Curs Off : Flash Off
Do
  Plot Rnd(319),Rnd(199),Rnd(15)
Loop

Later in this Chapter, you can learn how to change the
colours in your ink pots, and use them for instant graphic
effects. As for now, there should be sixteen different
colours speckling all over the screen in a random mess.
It would be impossible to establish what colour is sitting
at any coordinate simply by looking at the screen, so
Easy AMOS gives you a command to help.

=POINT
------
This is the command used to tell you the index number
of the colour occupying the x,y-coordinates. Try this
example:

  Plot 160,100

  Print The colour is;Point(160,100)


Drawing lines
-------------

DRAW

Line drawing is extremely simple. Pick two sets of
coordinates, and use them to tell Easy AMOS to Draw a
line from one To the other, like this:

 Draw 50,50 To 250,150

If you want to draw a line from wherever the graphics
cursor is set at the moment, just give the Draw To
command followed by a single set of coordinates. For
example:

 Draw To 275,175

			-=- 105 -=-

When you have done that, experiment with line drawing
anywhere on the screen, like this:

Draw 10,0 To 319,199

Draw To 275,50

Draw To 0,199

Line styles
-----------
Changing the style of straight lines is very simple. You
may remember that there is a way to make sure which
pixels are to be filled and which pixels are to remain
empty, using the twin or "binary" numbers zero and one,
and that a binary number can be introduced by using the
% symbol.

SET LINE
---------
This command tells the Amiga what style of line you
want to create, using a binary number made up of 16
Ubits". So a normal line, with no gaps in it, can be
imagined as a binary number where all the bits are set to
ONEs, like this:

 %1111111111111111 

But as soon as you introduce ZEROs into the pattern,
you set up a dotted line for your drawing operations.
Experiment with your own patterns, along these lines:

 Set Line %1100000101010011

 Draw To 319,199

 Draw 160,0 To 160,199

 Draw 0,100 To 319,100

			-=- 106 -=-

Try this example, which draws a range of spider's webs:

Flash Off : Palette 0, $FFF

SPIDERWEB:

Cls 0

Pen 1: Paper 0

Locate 0, 0

Input "Enter a number between 5 and 50." ;S

Curs Off

If S<5 or S>50 Then Goto SPIDERWEB

Cls 0

' This is where the web is drawn

' using variable S from Input

For Y=0 to 200 Step S

  Plot 0,Y

  Draw To Y, 200

Next Y

Locate 10, 3 : Print "Press a key to";

Locate 10, 4: Print "spin another web!;

wait Key

Goto SPIDERWEB


The first time you weave your web, input the number "5", and
draw a dense pattern Then try and understand why the
pattern is so expanded when you input "50". Experimentby
changing the Plot coordinates to something like:

Plot 100, Y

Draw To Y, 150

and input "5" again, to see how your web has been twisted.
Now use Set Line to change the style of your web strands.


			-=- 107 -=-


Drawing shapes
--------------
Here are some Easy AMOS short-cuts for drawing line
shapes on the screen. You can even use Set Line with the
first one, called Box.

BOX

draws the outline of a rectangle, from wherever you set
the coordinates of the top left-hand corner To the bottom
right-hand corner. For example:

    Set Line %1010101010101010

    Box 50,50 To 275,100


When it comes to circles and ellipses, graphic coordinates
are used in much the same way. This time, the x,y-
coordinate sets the centre point around which your
shape is going to be drawn. The "radius" is the distance
from the centre of the shape to the "circumference" or
rim of the shape, and it is set by giving the number of
pixels making up that distance. Obviously, a circle only
has one radius, but an ellipse has two: one for the radius
from the centre of the ellipse to its nearest side and one
for the radius from the centre to its furthest side.

			-=- 108 -=-


CIRCLE
ELLIPSE

Draw a circle now, by setting the coordinates of its
centre, followed by the length of its radius. Then draw
an ellipse in the same way, not forgetting to set the
length of both the short and the long radius. Try this
example:

 Circle 100,100,45

 Ellipse 250,90,30,70


With drawing commands, remember that if you leave
out the coordinates from where the shape is to be drawn,
it will appear from the current cursor position. You still
have to include the correct number of commas, like this:

   Draw 0,100 To 160,100

   Circle ,,45


Setting the graphics cursor
---------------------------
GR LOCATE

The graphics cursor sets the starting point for drawing
operations. Gr Locate places the graphics cursor at the
x,y-coordinates you choose, in the usual way. Try out
this example:

X=150 : Y=10
For R=3 To 87 Step 3
   Gr Locate X,Y+R
   Circle ,,R
Next R

			-=- 109 -=-


Setting graphics areas
----------------------
CLIP

This command is used to mark out an invisible
rectangular area of the screen using the usual graphic
coordinates, so that all drawing operations will be clipped
off when they reach the boundaries of the rectangle. To
restore the normal screen display, simply use Clip again,
leaving out the coordinates. Areas that are preserved
outside the clip zone can be used for items such as
borders and control panels. To see how this works,
insert the following line at the beginning of that last Gr
Locate example, and see what effect it has on the circles:

 Clip 100, 30 To 205,140

Colour
------
One of the best features of Easy AMOS is the way it gives
you the freedom to exploit your Amiga's superb colour-
handling features. The next part of this chapter tells you
how.


Choosing colours
----------------
So far, you have been stuck with a pre-set colour for your
ink. The next command explains how to take control
and change ink colours to your own preferences.

INK
---
This is the command for filling the ink pot you are using
with your choice of colour from a selection of zero to 64
colournumbers. Forexample:

   Ink 5

   Draw to 319,199

The Ink command can also be used to set colours for
borders around shapes and whatever fills up those
shapes, and this will be explained later. Before that, you
should understand how different colours are mixed.


			-=- 110 -=-

Mixing colours
---------------
Every shade of colour displayed on a television set or a
monitor is composed of various mixtures of the same
three primary colours: Red, Green and Blue, or "RGB"
for short. There is a range of 16 strengths available for
each of the RGB levels in every colour. A zero level is
equivalent to "none" of that colour, in other words
"black", and the maximum intensity is the equivalent of
"all" of that colour.

Because there are three separate components each with
16 possible strengths, the maximum range of shades
available is 16 times 16 times 16, which equals 4096
possible colours!

The Amiga likes to recognise colours by their RGB
components. Unfortunately, it isn't too keen on the
normal decimal system of numbers, which we have
evolved based on the ten digits we carry around at the
end of our arms, known as our "fingers". Your computer
prefers to use a system called Hexadecimal ", based on 16
digits. Of course, we haven't got 16 different numbers
to match up with this way of thinking, so we use all the
numbers we have, plus a few letters to make up the
difference. Look at this table and try to get familiar with
hexadecimals. The top line shows digits in the
hexadecimal system, ~hex" for short, and the bottom line
shows the decimal equivalent.


    HEXDIGIT 0 1 2 3 4 5 6 7 8 9 0  A  B  C  D  E  F

    DECIMAL  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

It is not difficult to take a look at what colours are sitting
in your first 16 ink pots, and find out how much Red,
Blue and Green is being used to make up each colour.

			-=- 111 -=-

=COLOUR
-------
This function takes an ink pot index number enclosed in
brackets from zero to 31, and tells you what colour value
is sitting in that pot. Try and understand what this
routine is doing when you ask the Colour function to
report on a hexadecimal string of colour value. We use
Hex$ for this purpose, in the following way:

Curs Off: Flash Off

For C = 0 to 15: Ink c

  Print Hex$ (Colour (C), 3)

  Circle 160, 75 , 10+C

Next C


There should now be a list of 16 colour values in hex
code, alongside a bunch of 16 circles using those colours.
Every hex number is introduced by a dollar sign. $ is not
only used to represent a "string". When used with
numbers like this, it introduces a hex number for the
Amiga to recognise. So wheneveryou usea hexnumber,
always put a $ in front of it.

Look at the first hex value, and the innermost circle. Sure
enough, $000 means that there is no Red, no Green and
no Blue component in ink pot number 0. It is drawn with
black ink.

Here are some other values, which should be easy to
understand if you refer back to the hex digit/decimal
table above.

  COLOUR HEX VALUE RGB COMPONENTS

  Green  $0FO      R=0 G=F B=0
  White  $FFF	   R=F G=F B=F
  Violet $FOF      R=F G=0 B=F
  Sickness $A91    R=A G=9 B=1

			-=- 112 -=-


'You can have
any colour you
want, so long
as it's black!'
   (Henry Ford,
        1924)

If that is clear, you are ready to mix your own coloured
ink and pour it into whatever ink pot you want. There
are 32 pots, called "colour registers" waiting on your
palette.

COLOUR
------
This command is used to set a new colour ready for use.
Follow the command with the colour index number,
then the new hex value introduced by the $ symbol, like
this: $RGB. Run this example from Direct mode:

 Colour 0, $FF0

If you have made that last example work, colour register
zero no longer holds black ink, but bright yellow.
Experiment with mixing your own shades now, and try
loading them into different ink pots.

COLOUR BACK

This command is used to set the background colour of
the screen, that is to say, the areas of screen that are not
in use, such as the very top and bottom. The $RGB value
is set in hex as usual, so try changing the background
colour now, like this:

 Colour Back $666

Instead of mixing new colours, existing colours can also
be used, like this:

 Colour Back Colour (1)


Setting several colours
-----------------------
Spectacular effects can be achieved by multicolour
changes, but assigning individual colours to every paint
pot would be a tedious business. Never fear, Easy
AMOS has a suitable short cut.

			-=- 113 -=- 


PALETTE
-------
This is a much more powerful command than Colour, and it
can be used to set as many or as few colours in your artists
palette as are needed. Your program always starts off using a
list of pre pr~grammed or "default~ colours sitting in the
existing palette. Run this line now, then draw something on
the screen:

 Palette , $F00

The second palette collour has changed to red, but all the other
colours retain their original settings. Now try this routine,
which changes the first five colours in the palette with a
hexadecimal poem, and displays the result on the screen. If
you don't like the colours or the poetry, feel free to change the
values!

 Pa1ette $FAB, $F1B, $BAD, $0DD, $B0D

Curs off: Flash off

For c=0 To 4: Ink C
   Print Hex$ (Colour(c),3)
   Bar 50,8*C To 150, 8*C+8
Next C

There is a new command in that last example called Bar,which
is a good introduction to the next section. Reset your colours
now, by getting rid of any of your new Palette commands,
before you go on.

Filled shapes
-------------
You should now be familiar with drawingbasic shapes, and
setting choices of colour. The next stage explains how to
combine these skills.

PAINT
-----
Using this command will fill any section of your screen with
a solid block of colour. All you have to do is include this
command in your program, followed by a set of coordinates
located anywhere inside the area of screen you want to paint
with the current ink colour. Try this:

			-=- 114 -=-



 Palette 0, $f00

 Circle 160,100,50

 Paint 50,50

If that has worked properly, you have just drawn the Japanese
national flag on screen.

BAR
---
This is used to draw solid bars of colour by setting up the top 
left-hand graphic coordinates to the bottom right hand coordinates 
in the normal way like this:

  Bar 50,50 to 125,175

Shapes with many sides are called polygons, and Easy AMOS lets
you draw coloured shapes with as many sides as you want, using a 
single command.

POLYGON
-------
The polygon command sets up any size and shape if you tell it the
coordinates for the beginning and end of each on of its sides as 
usual. If the first pair of graphic coordinates is left out, then your
shape will begin from the current graphic cursor position. Try and
build up different geometric shapes like this:

 Polygon To 250,150 to 135,175 to 200,75

Now fill the screen with intergalactic stalagmites by running the
next routine, using random colours, coordinates, heights and widths 
of triangles. When youve seen enough, try changing the values of the
numbers in brackets...

   Do
     Ink Rnd(15)
     X1 = Rnd(250) : Y1=Rnd(150)
     B  = Rnd(200) : W = Rnd(150)
     Polygon = X1,Y1 to X1+W,Y1 to X1+W/2, Y1+H To X1,Y1
   Loop

			-=- 115 -=-

Type in and [Run] this example, which creates a mosaic
pattern with painted grids ranging from red through to
blue. See how it makes use of the graphic commands
Palette, Ink, Plot, Draw To and Paint:

  Screen Open 0,320,200,16,Lowres
  Curs Off : Cls 0 : Flash Off
  Rem Type in next line as one long line
  Palette $0,$F00,$E00,$D00,$C00,$B00,$A00,
          $901,$802,$703,$604,$505,$406,
          S307,S208,$109
  XA=80 : YA=20
  P=0
  For D=0 To 140 Step 10
  Ink 1
    Plot D+XA,YA : Draw To D+XA,140+YA 
    Plot XA,D+YA : Draw To 140+XA,D+YA
    If P<>0
      For S=0 To P-1
        Ink P+1
        Paint(P-1)*10+5+XA,S*10+5+YA
        If S<>P-1
          Paint S*10+5+XA,(P-1)*10+5+YA
        End If
      Next s 
    End if
  P=P+l
  Wait Vbl
  Screen Swap
  Next D
  Ink 15
  Paint 0,0
  Ink O
  Paint XA,YA

			-=- 116 -=-

SET PAINT
---------
This is a simple command that switches outlines on and
off for any shapes drawn with Polygon and Bar
instructions. Follow Set Paint with a value of 1, and
borders appear in the previous Ink colour. Follow it
with a zero and you are back to normal, with no borders
showing. For example:

        Ink 0,1,2 : Set Paint 1

        Bar 5,5 To 200,100

	Set Paint 0: Bar 210,75 To 310,190


More inking
-----------
Look at the three numbers that follow the Ink command
in that last example. After the number that sets the new
ink colour there are two more settings.

INK
---
The Ink command can also have optional settings for
paper and border colours. You don't have to set them,
as long as commas are used in the right place. The paper
colour sets a background colour that will be used for any
filling-in patterns. The border colour selects what colour
is used for any outline borders on bars and polygons.
Try using the following settings in turn for drawing
bars, and see the effect, one after the other:

  Ink 3 : Rem Set ink colour
  Ink ,,5 : Rem Set border outline only
  Ink 0,8,2 : Rem Set ink,back,border
  Ink 6,13 : Rem Set ink and background


Filling shapes
--------------
Filling shapes with plain colours is all very well, but
Easy AMOS allows for a much wider choice of filling
effects.

			-=- 117 -=-


SET PATTERN
-----------
This is used to select from a whole range of pattern
numbers. The normal or "default" state of affairs fills
shapes with the current ink colour, and is set with a zero,
like this:

  Set Pattern 0

If Set Pattern is followed by a POSITIVE number from 1
to 34, shapes are filled from a ready-made selection of
patterns. Take a look at them now by running this
routine:

    Do
      For n = 0 to 34
        Set Pattern N
        Ink 0,1,2 : Set Paint 1
        Bar 50,50 To 150,150
        Locate 0,0 : Print N;" "
	Wait 50
      Next n
    Loop


If Set Pattern is followed by a NEGATIVE number,
shapes are filled by an image held in a special memory
bank. These images go by the name of "Bobs", and "Bob"
images can be very complicated. So in order to use them
as a fill pattern, the Set Pattern command automatically
simplifies their colouring and their dimensions. The
whole of the next Chapter is devoted to "Bobs", so wait
until you understand them before trying Set Pattern
with a negative number. For the moment, let's take a
look at some ways of changing the appearance of
graphics.

			-=- 118 -=-

Overwriting styles
------------------
When graphics are drawn, they normally get "written"
over what is already on the screen. But there are four
alternative drawing modes that change the way graphics
appear, and they can be used one at a time, or combined
to generate a whole range of effects.

GR WRITING

This command is used to set the various modes used for
drawing lines, shapes, filled shapes and graphical text.
There are several alternative modes which can be used
singly or combined to create dozens of different effects.

Settings are made using a "bit pattern", where the
following values give the following results:

Bit 0=0 only draws graphics using the current INK
        colour.

Bit 0-1 replaces ANY existing graphics with new
        graphics.

Bit 1=1 changes old graphics that OVERLAP with new
        graphics.

Bit 2=1 reverses ink and paper colours creating
        INVERSE VIDEO.

The normal drawing state is where new graphics
overwrite old graphics, and replace them. Like this:

Ink 2,5 : Text 100,80,  "NORMAL TEXT"
Wait 100 : Gr Writing 1
Text  100,80,REPLACE

By setting the Gr Writing bit pattern to zero, only new
graphics that are set to the current INK colour will be
drawn. This allows you to merge new graphics with an
existing background. Try this example:

Ink 2,5 : Text 100,80,"NORMAL TEXT"
Wait 100 : Gr Writing O
Text 100,80, "MERGED"


			-=- 119 -=-


The next examples reverse an image before it is drawn,
creating INVERSE VIDEO effects. Add the following
lines to the last example to see the result.

   Wait 100 : Gr Writing 4
   Text 100,90,  "STENCIL"
   Wait 100 : Gr Writing 5
   Text 100,100,"REVERSE"

Experiment now with your own values, and see what
effect the various overwriting techniques can provide.


Flashing
--------
Now for something flashy. You will have noticed during
your programming that colour number 3 automatically
flashes on and off. You also came across the Flash Off
and Flash commands when you were learning about the
text cursor.

FLASH
-----
is a command that can do much more than affect colour
number 3. When Flash is followed by the index number
of any colour, that colour will have animated flashing
every time it is used, until you command the program
otherwise. What's more, you can flash between as many
as 16 colours, and set the flash rate to any length that
pleases you. It works like this:

  Flash 1,"(0A0,50)(F0F,50)"

Let's decode that line of program. The colour to be
affected follows the Flash command, in this case colour
number 1. After the comma, the set of quotation marks
can contain up to 16 pairs of brackets, and inside each
pair of brackets there are two components. Each pair of
brackets represents the colour that is next on the list to be
flashed, and how long it will appear for. Colour is set in
RGB component values, like the ones in the right-hand
column of the table earlier in this chapter. Delay time is
set in 50ths of a second.


			-=- 120 -=-

So the last example has the effect of flashing colour
number one between a green value and a violet value
once every second. See if you can create some special
effects using this method, such as flashes of lightning
and starbursts. Don't forget Flash Off to prevent these
experiments affecting other parts of your programs.


Rainbows
--------
The electronic canvas of a computer artist doesn't have
to be blank or boring. Imagine painting on shadows and
rainbows! The next command lets you do both.


Copy and run the following program, then get ready to
understand how it works. It could be the opening scene
of your first artistic production. Where it says "MY
NAME presents", you are welcome to insert your own
name!

  Set Rainbow 0,1,16,"(1,1,15)","",""

  Rainbow 0,56,1,255

  Curs Off : Flash Off

  Locate .12 : Centre "MY NAME presents"

  Wait Key


SET RAINBOW
-----------
This command creates a sort of Venetian blind effect
which alternates light and shade and can create some
excellent rainbows. It works with these parameters, in
the following order:

Set Rainbow is followed by an identification number
for this rainbow, then a colour index number, then the
length of the colour storage table, then the "(Red
string)","(Green string)","(Blue string)"


Look at your last example, and identify each part of the
Set Rainbow process as they are explained.

			-=- 121 -=-

The rainbow identification number can be between zero
and 3. In other words, you can set up to four different
rainbows for later use, and number them 0,1, 2 or 3.
Your example sets rainbow number zero.

The colour index number sets the colour to be affected
by the rainbow.


Next is the colour storage table size, which can range
from 16 all the way up to 65500, with each unit ready to
hold one "scan" line of colour. If this value is less than the
actual height of your rainbow, the colour pattern gets
repeated down the screen.

Finally, the Red, Blue and Green components of the
rainbow are set up as "strings", each within their own
(brackets). Your example leaves out any reference to the
Green and Blue components, which is why your rainbow
effect is completely in the Red. The three values in
brackets represent this:

  (number,step,count).

  Number refers to the number of lines assigned to one
  colour value. Think of it as controlling the "speed" of
  the sequence.

  Step is a value to be added to the colour, which
  controls the change in this colour.

  Count is simply the number of times this whole
  process iS performed.

The best way to understand all this is to change the
values in the Set Rainbow line of the example, and see
what happens.


			-=- 122 -=-


RAINBOW
-------
Now for the command that is used to display one of your
rainbows on screen. Again, let's work through its parameters
in order of appearance. They run like this

    Rainbow number,base,vertical position, height

The rainbow number should be obvious, and refers to one of
four possible patterns created with Set Rainbow.

The base number is a sort of offset value for the first colour in
the Set Rainbow table, and it governs the cycling or repetition
of the rainbow on screen.

The vertical position is a coordinate with a minimum value of
40, and it affects the starting point of the rainbow's display,
vertically, on the screen.

Finally,the height number sets the rainbow's vertical height in
screen "scan" lines.

It is worth knowing that only one rainbow at a time can be
displayed at a particular scanline, andt he one with the lowest
identification  number will normally be drawn in front of any
others.

RAINBOW DEL
-----------
This is short for rainbow delete. The Rainbow Del comrnand
will get rid of all rainbows that have been set up. If you add a
rainbow identity number, then only that particular rainbow
will be flushed down the electronic toilet. For example:

 Rainbow Del 0

RAlN
----
is a very power ful rainbow instruction, because it allows you
to change the colour of any rainbow line to any value you
choose. Rain must be followed by a pair of brackets containing
the number of the rainbow to be changed and the scan line
number that is to be affected, like this

  Rain (number, line)=colour

			-=- 123 -=-

"Enjoy a rainbow
without
forgetting
the forces that
made it. "
   (Mark Twain,
        1897)


The next example works in the following way. Rainbow
number 1, with colour index 1, is given a colour table
length of 4097 (one entry for every colour value that will
be on the screen). The RGB values are left blank, to be set
up by the first For. . .Next routine that contains the Rain
command. The second For...Next routine uses Rainbow
to display a pattern 255 lines long, starting at scan line
40. Do. . .Loop is used to repeat this process.

Curs Off : Centre "OVER THE RAINBOW"
Set Rainbow 1,1,4097,"","",""
For l = 0 to 4095
  Rain(1,L)=L
Next l  
Do
  For C=0 To 4095-255 Step 4
    Rainbow 1,C,40,255
    Wait Vbl
  Next C
Loop


The stage is fast approaching when your graphics
programming will cease to be a bunch of little exercises,
and you will have the confidence to start linking several
routines together to create original computer art. Many
of the techniques you can already use will play a part in
creating electronic backdrops, instruction panels, title
screens, and special effects, no matter what sort of
computer programs you are interested in. Easy AMOS
can help you release your creative talents, and if you still
think that your efforts so far don't begin to compare with
your favourite programs, think again.


			-=- 124 -=-

The last part of this Chapter deals with some practical
information before you enter the incredible world of
animated computer graphics. It will be worth your
while to read through it, if you have any intention of
mixing text and graphics in your own programs.


Converting coordinates
----------------------
When text and graphics need to be displayed at the same
time, you want to be able to relate both the text coordinates
and the graphic coordinates together. As you already
know they use two different systems, so Easy AMOS
provides instant conversion functions.


=X TEXT
=Y TEXT

Supposing you want some text to hit a certain graphic
target. All you need to do is tell the commands X Text
and Y Text the graphic coordinates you are interested in,
like this:

Circle 116,99,45

X=X Text(116) : Y=Y Text(99)

Locate X,Y

Print +

=TEXT LENGTH
------------
Use this function to discover the graphical length of a
string of characters. This is important when different
sized fonts are involved, and you need to know exactly
how many pixels wide a string of text will be.

T$= "Easy AMOS
L=Text Length(T$)
Print L

			-=- 125 -=-


=TEXT BASE
----------
This is used in much the same way to work out the
height of the "baseline" of the current font. The baseline
is the number of pixels from the top of a character set,
down to the point where the characters sit on the screen.
Obviously, letters that have little tails on them (g, j, p, q
and y) dangle below the baseline.

  Get Fonts : Set Font 2

  Print Text Base


Because graphical text fonts have various shapes and
sizes, the Print command cannot be used to position
graphical text on screen. Once Text Base has revealed
the baseline of a font, this can be used as a graphic
coordinate.

TEXT
---
Is the command that prints a string of text at graphic x,y-
coordinates. So your text can be printed at any pixel
position on screen. Like this:

 Text 123,123, That's all folks


			-=- 126 -=-
