Date: Fri, 29 Nov 1996 15:33:13 +0100
From: Henk Jonas <subvcbhd@linux.zrz.TU-Berlin.DE>
To: webmaster@wotsit.demon.co.uk
Subject: AMFF-FileFormat



AmigaMetaFile-Format     AMFF

This Format is a IFF graphics subformat:

CHUNK     DATA               Length in Bytes
--------------------------------------------

FORM      AMFF                     4

VERS      version.reversion        8

BODY      list of amf-functions:   any
          * function-number        4
          * lenght of arguments    4
            in longwords
          * arguments              length*4

Example:

F O R M x x x x A M F F 

 CHUNK   lenght  DATA


V E R S 0 0 0 8 0 0 0 2 0 0 0 1

 CHUNK  lenght version  reversion


B O D Y x x x x 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 7 F F F 7 F F F ...

 CHUNK   lenght function length  xstart  ystart   xend    yend


The following functions are defined:

if you found unsupported functions in AMFF files, please skip it

virtual coordinates are:

0------> x=32767
|
|
|
V
y=32767
                                                                    .90
all angles are in degree and start is left and go anticlockwise  180 * ..0
all values are LONG                                                 270

AmfFunctions:

FUNCTION            DESCRIPTION               ARGUMENTS

DrawFunctions:
 0 CLEAR_REGION     Fill a rectangle with     xstart   leftedge
                    the BackgroundColor       ystart   topedge
                                              xend     rightedge
                                              yend     bottomedge

 3 LINE             Draw line                 xstart
                                              ystart
                                              xend
                                              yend

 5 TEXT             Write text                x       x-position
                                              y       y-position
                                              alpha   angle
                                              CHARS   0-terminated

 6 ELLIPSE          Draw ellipse              x       x-position of center
                                              y       y-position of center
                                              xsize   radius in x
                                              ysize   radius in y

 7 BOX              Draw rectangle            xstart  leftedge
                                              ystart  topedge
                                              xend    rightedge
                                              yend    bottomedge

 8 FILL_ELLIPSE     Draw a filled ellipse     see ELLIPSE

 9 FILL_BOX         Draw a filled rectangle   see BOX

11 POLYGON          Draw a polygon            x,y - pars
                                              make move to first x,y then
                                              draw to the next x,y's

12 BITMAP_PIC       Paint a bitmappicture     not supported yet

13 ARC              Draw a elliptical arc     x       x-position of center
                                              y       y-position of center
                                              xsize   radius in x
                                              ysize   radius in y
                                              alpha   start angle
                                              beta    end angle

14 MARK             Draw marker               x
                                              y

15 CURVE            Draw beziercurve like     x1,y1         startposition
                    postscript-operator       x2,y2         first and
                    'curve to'                x3,y3         second holdpos
                                              x4,y4         endposition

16 FILL_POLY        Draw a filled polygon     see POLYGON but it closed the
                                              polygon

17 ROUNDED          Draw a rounded rectangle  xstart  leftedge
                                              ystart  topedge
                                              xend    rightedge
                                              yend    bottomedge

18 PIE              Draw a pie.               x       x-position of center
                                              y       y-position of center
                                              xsize   radius in x
                                              ysize   radius in y
                                              alpha   start angle
                                              beta    end angle

19 FILL_ROUNDED     Draw a filled rounded     xstart  leftedge
                    rectangle                 ystart  topedge
                                              xend    rightedge
                                              yend    bottomedge

20 FILL_PIE         Draw a filled pie.        x       x-position of center
                                              y       y-position of center
                                              xsize   radius in x
                                              ysize   radius in y
                                              alpha   start angle
                                              beta    end angle

SetFunctions:
100 FONT            Like 106 but fontheight   see SETFONT
                    in metacoordinates,
                    in metafile will SETFONT
                    to FONT

101 SETFGPEN        Set the forgroundpen      r    red-value   |Byte repeated
                                              g    green-value |in every Byte
                                              b    blue-value  |from ULONG

102 SETBGPEN        Set the backgroundpen     see forgroundpen

103 SETDRMODE       Set drawmode              mode    0 w/o background
                                                      1 with background
                                                      2 complement
                                                      3 invert

104 SETLINEPAT      Set linepattern           patnr   0 solid
                                                      1 - - -
                                                      2 -- --
                                                      3 .....
                                                      4 -.-.-
                                                      5 --.--

105 SETLINEWIDTH    Set linewidth             size    width of line

107 SETFILLPAT      Set fillpattern           patnr   0 solid
                                                      1 ////
                                                      2 \\\\
                                                      3 ||||
                                                      4 ====
                                                      5 XXXX
                                                      6 ++++

108 SETMARKSIZE     Set the size of marker    size    height of marker

109 SETMARKTYPE     Set type of marker        type    0 x
                                                      1 filled square
                                                      2 outline dreieck
                                                      3 outline square
                                                      4 o
                                                      5 +
                                                      6 outline karo

110 SETDPI          Set the resolution of     xdpi    resolution in x
                    output-device, only for   ydpi    resolution in y
                    for channel=1 or 4                both in points per inch
                    The initial resolution
                    for channel1 and 4 are
                    72 dpi, change only if
                    you know what you do!



