@database MPMorph-rexx
@rem created by makedoc
@node main

@{"MPMorph/--background--" link "--background--"}
@{"MPMorph/ADDGRID" link "ADDGRID"}
@{"MPMorph/ADDPOINT" link "ADDPOINT"}
@{"MPMorph/CLEAR" link "CLEAR"}
@{"MPMorph/DELETEPOINT" link "DELETEPOINT"}
@{"MPMorph/EDITPOINTS" link "EDITPOINTS"}
@{"MPMorph/EXITPOINTS" link "EXITPOINTS"}
@{"MPMorph/GETATTR" link "GETATTR"}
@{"MPMorph/HELP" link "HELP"}
@{"MPMorph/LINKPOINTS" link "LINKPOINTS"}
@{"MPMorph/LOCKGUI" link "LOCKGUI"}
@{"MPMorph/MOVEPOINT" link "MOVEPOINT"}
@{"MPMorph/NEWPOINTS" link "NEWPOINTS"}
@{"MPMorph/OPEN" link "OPEN"}
@{"MPMorph/OPENPOINTS" link "OPENPOINTS"}
@{"MPMorph/QUIT" link "QUIT"}
@{"MPMorph/SAVE" link "SAVE"}
@{"MPMorph/SAVEAS" link "SAVEAS"}
@{"MPMorph/SCALE" link "SCALE"}
@{"MPMorph/SETATTR" link "SETATTR"}
@{"MPMorph/SETCURR" link "SETCURR"}
@{"MPMorph/SETMAX" link "SETMAX"}
@{"MPMorph/SETMESSAGE" link "SETMESSAGE"}
@{"MPMorph/SETSIZE" link "SETSIZE"}
@{"MPMorph/TRIANGULATE" link "TRIANGULATE"}
@{"MPMorph/UNLINKPOINTS" link "UNLINKPOINTS"}
@{"MPMorph/UNLOCKGUI" link "UNLOCKGUI"}


@endnode
@node "--background--" "MPMorph/--background--"

--background-- :


  The default portname for MPMorph is MPMORPH. This can be overidden by the
  PORTNAME parameter.

  If 'OPTIONS RESULTS' is on then when an error is returned then RC2 will
  hold a supplementary error (number or text).

  Shortened unique formats of commands can be used.

@endnode
@node "ADDGRID" "MPMorph/ADDGRID"

ADDGRID :


   NAME   
  ADDGRID -- Adds a grid of joined points.

   SYNOPSIS
  ADDGRID( X/K/A/N,Y/K/A/N,FORCE/S )

   FUNCTION
  Adds a grid of points joined by lines. Displays a requester if the 
  current project is not saved.

   INPUTS
  X     - The X number of cells.
  Y     - The Y number of cells.
  FORCE - Prevents the unsaved project requester.

   RESULT
  Returns error 10 if X or Y are zero, or other error.

   EXAMPLE
  ADDGRID X 5 Y 5

   NOTES
  The number of points added is (X+1)*(Y+1).

   BUGS

   SEE ALSO
  TRIANGULATE(), ADDPOINT(), LINKPOINTS().

@endnode
@node "ADDPOINT" "MPMorph/ADDPOINT"

ADDPOINT :


   NAME   
  ADDPOINT -- Adds a point.

   SYNOPSIS
  ADDPOINT( X1/K/A/N,Y1/K/A/N,X2/K/A/N,Y2/K/A/N )

   FUNCTION
  Adds a point.

   INPUTS
  X1 - The X coord in image 1.
  Y1 - The Y coord in image 1.
  X2 - The X coord in image 2.
  Y2 - The Y coord in image 2.

   RESULT
  Returns error 10 if out of memory.

   EXAMPLE
  ADDPOINT X1 5 Y1 5 X2 10 Y2 10

   NOTES
  The point is automatically restricted to the current output size.

   BUGS

   SEE ALSO
  DELETEPOINT(), MOVEPOINT(), ADDGRID(), LINKPOINTS().

@endnode
@node "CLEAR" "MPMorph/CLEAR"

CLEAR :


   NAME   
  CLEAR -- Clears the current project creating a new unnamed project.

   SYNOPSIS
  CLEAR( FORCE/S )

   FUNCTION
  Clears the current project creating a new unnamed project.  Displays
  a requester if the current project is not saved.

   INPUTS
  FORCE - Prevents the unsaved project requester.

   RESULT
  Returns error 10 if the unsaved project requester is cancelled, or
  the image windows are open.

   EXAMPLE
  'CLEAR FORCE'

   NOTES

   BUGS

   SEE ALSO
  NEWPOINTS(), OPEN().

@endnode
@node "DELETEPOINT" "MPMorph/DELETEPOINT"

DELETEPOINT :


   NAME   
  DELETEPOINT -- Deletes a point.

   SYNOPSIS
  DELETEPOINT( X/K/A/N,Y/K/A/N )

   FUNCTION
  Deletes a point.

   INPUTS
  X - The X coord in image 1.
  Y - The Y coord in image 1.

   RESULT
  Returns error where relevant.

   EXAMPLE
  DELETEPOINT X 5 Y 5

   NOTES
  The coords are of the point in image 1.

   BUGS

   SEE ALSO
  ADDPOINT().

@endnode
@node "EDITPOINTS" "MPMorph/EDITPOINTS"

EDITPOINTS :


   NAME   
  EDITPOINTS - Opens the image edit windows.

   SYNOPSIS
  EDITPOINTS( )

   FUNCTION
  Opens the control and edit windows. If they were all ready open then
  brings the control window to the front and activates it.

   INPUTS
  None.

   RESULT
  None.

   EXAMPLE
  'EDITPOINTS'

   NOTES

   BUGS

   SEE ALSO
  EXITPOINTS().

@endnode
@node "EXITPOINTS" "MPMorph/EXITPOINTS"

EXITPOINTS :


   NAME   
  EXITPOINTS - Closes the image edit windows.

   SYNOPSIS
  EXITPOINTS( )

   FUNCTION
  Closes the control and edit windows.

   INPUTS
  None.

   RESULT
  Returns error 10 if the image windows are not open.

   EXAMPLE
  'EXITPOINTS'

   NOTES

   BUGS

   SEE ALSO
  EDITPOINTS().

@endnode
@node "GETATTR" "MPMorph/GETATTR"

GETATTR :


   NAME   
  GETATTR -- Gets the attributes of a variable etc.

   SYNOPSIS
  GETATTR( VAR/K,STEM/K,NAME/A ) => VALUE

   FUNCTION
  Returns the current value of a specified field.

   INPUTS
  VAR     - Variable to return result rather than RESULT.
  STEM    - Stem variable for result.
  NAME    - Name of variable to get attributes of:
              SAVED      - 1 if project is saved, otherwise 0;
              OPENPOINTS - 1 if image windows are open, otherwise 0;
              FILENAME   - the current project name;
              FILE1      - the first workbench image file;
              FILE2      - the second workbench image file;
              FILE241    - the first 24 bit image file;
              FILE242    - the second 24 bit image file;
              OUTPUT     - the output file name;
              WIDTH      - the output image width;
              HEIGHT     - the output image height;
              SINGLE     - the type of morph
                           0 - Morph, 1 - Warp
                           2 - AnimMorph, 3 - AnimWarp;
              FRAMES     - the number of frames;
              START      - the start frame;
              PUBSCREEN  - Name of public screen MPMorph is open on;
              HOOK       - Address of progress hook;
              LASTUPDATE - Time (seconds) of last update (V4.4)

   RESULT
  If STEM is provided then result is returned in stem.value, otherwise
  if VAR is provided then result is in var, otherwise result is in
  RESULT;

  Returns error when required.

   EXAMPLE
  options results;getattr saved;say result -> 0

   NOTES
  HOOK is a "struct Hook *" and should be called with parameters as
  for MPImage.library ProgressHook. See EdgePoints for an example.

   BUGS

   SEE ALSO
  SETATTR().

@endnode
@node "HELP" "MPMorph/HELP"

HELP :


   NAME   
  HELP -- returns help on commands.

   SYNOPSIS
  HELP( VAR/K,STEM/K,COMMAND,PROMPT/S ) => COMMANDDESC,COMMANDLIST/M

   FUNCTION
  Returns help on all or a specified command.

   INPUTS
  VAR     - Variable to return result rather than RESULT.
  STEM    - Stem variable for result.
  COMMAND - Command to provide template for.
  PROMPT  - Uses Amigaguide to display help for COMMAND.

   RESULT
  If STEM is provided and COMMAND is not provided then the number of
  commands is returned in stem.commandlist.count and the commands are
  returned in stem.commandlist.n where n=1 to count.

  If STEM is provided and COMMAND is also provided then the template
  for the command is returned in stem.commanddec.

  If STEM is not provided then the result is returned in the VAR (if
  provided) otherwise result. If COMMAND is not provided then the
  result is the number of commands followed by each command, otherwise
  the result is the command template.

  If PROMPT is supplied then no result is returned.

  Returns error when required.

   EXAMPLE
  options results;help;say result -> 20 ADDGRID ADDPOINT ...

  options results;help stem fred.;say fred.commandlist.count -> 20

  options results;help quit var bill;say bill -> QUIT FORCE/S

  help AR-Postscript PROMPT

   NOTES

   BUGS

   SEE ALSO

@endnode
@node "LINKPOINTS" "MPMorph/LINKPOINTS"

LINKPOINTS :


   NAME   
  LINKPOINTS -- Links two points.

   SYNOPSIS
  LINKPOINTS( X1/K/A/N,Y1/K/A/N,X2/K/A/N,Y2/K/A/N )

   FUNCTION
  Links two points.

   INPUTS
  X1 - The X coord of point 1 in image 1.
  Y1 - The Y coord of point 1 in image 1.
  X2 - The X coord of point 2 in image 1.
  Y2 - The Y coord of point 2 in image 1.

   RESULT
  Returns error where relevant.

   EXAMPLE
  LINKPOINTS X1 5 Y1 5 X2 10 Y2 10

   NOTES
  The coords are of the points in image 1.

   BUGS

   SEE ALSO
  UNLINKPOINTS(), ADDGRID(), ADDPOINT().

@endnode
@node "LOCKGUI" "MPMorph/LOCKGUI"

LOCKGUI :


   NAME   
  LOCKGUI - Prevents user input.

   SYNOPSIS
  LOCKGUI( )

   FUNCTION
  Prevents gui input. Displays a short message to state that the
  program is locked.

   INPUTS
  None.

   RESULT
  None.

   EXAMPLE
  'LOCKGUI'

   NOTES

   BUGS

   SEE ALSO
  UNLOCKGUI().

@endnode
@node "MOVEPOINT" "MPMorph/MOVEPOINT"

MOVEPOINT :


   NAME   
  MOVEPOINT -- Moves a point.

   SYNOPSIS
  MOVEPOINT( X/K/A/N,Y/K/A/N,X1/K/A/N,Y1/K/A/N,X2/K/A/N,Y2/K/A/N )

   FUNCTION
  Moves a point.

   INPUTS
  X  - The old X coord of point in image 1.
  Y  - The old Y coord of point in image 1.
  X1 - The new X coord of point in image 1.
  Y1 - The new Y coord of point in image 1.
  X2 - The new X coord of point in image 2.
  Y2 - The new Y coord of point in image 2.

   RESULT
  Returns error where relevant.

   EXAMPLE
  MOVEPOINT X 2 Y 2 X1 5 Y1 5 X2 10 Y2 10

   NOTES
  The point is automatically restricted to the current output size.
  The old coords are of the point in image 1.

   BUGS

   SEE ALSO
  ADDPOINT().

@endnode
@node "NEWPOINTS" "MPMorph/NEWPOINTS"

NEWPOINTS :


   NAME   
  NEWPOINTS -- Deletes all existing points.

   SYNOPSIS
  NEWPOINTS( FORCE/S )

   FUNCTION
  Deletes all existing points. Displays a requester if the current project
  is not saved.

   INPUTS
  FORCE - Prevents the unsaved project requester.

   RESULT
  Returns error 10 if the image windows are not open, or save requester
  cancelled.

   EXAMPLE
  'NEWPOINTS'

   NOTES

   BUGS

   SEE ALSO
  CLEAR(), OPENPOINTS().

@endnode
@node "OPEN" "MPMorph/OPEN"

OPEN :


   NAME   
  OPEN -- Opens an existing project.

   SYNOPSIS
  OPEN( FILENAME/K,FORCE/S )

   FUNCTION
  Clears the existing project and then loads a new one from the supplied
  project file. Displays a requester if the current project is not saved.

   INPUTS
  FILENAME - Name of file. If not supplied then requester is displayed.
  FORCE    - Prevents the unsaved project requester.

   RESULT
  Returns error 10 if the image windows are open or the file can not be
  loaded.

   EXAMPLE
  'OPEN FILENAME=ram:temp.p FORCE'

   NOTES

   BUGS

   SEE ALSO
  CLEAR(), OPENPOINTS().

@endnode
@node "OPENPOINTS" "MPMorph/OPENPOINTS"

OPENPOINTS :


   NAME   
  OPENPOINTS -- Deletes all existing points and loads from a file.

   SYNOPSIS
  OPENPOINTS( FILENAME/K,FORCE/S )

   FUNCTION
  Deletes all existing points and then loads new ones from the supplied
  project file. Displays a requester if the current project is not saved.

   INPUTS
  FILENAME - File to open. If not supplied then requester is displayed.
  FORCE    - Prevents the unsaved project requester.

   RESULT
  Returns error 10 if the image windows are not open or the file can not
  be loaded.

   EXAMPLE
  'OPENPOINTS FILENAME=ram:temp.p'

   NOTES

   BUGS

   SEE ALSO
  NEWPOINTS(), OPEN().

@endnode
@node "QUIT" "MPMorph/QUIT"

QUIT :


   NAME   
  QUIT - Quits MPMorph.

   SYNOPSIS
  QUIT( FORCE/S )

   FUNCTION
  Quits MPMorph.

   INPUTS
  FORCE - Prevents the unsaved project requester.

   RESULT
  Returns error 10 if the requester is cancelled.

   EXAMPLE
  'QUIT FORCE'

   NOTES

   BUGS

   SEE ALSO

@endnode
@node "SAVE" "MPMorph/SAVE"

SAVE :


   NAME   
  SAVE - Saves the current project.

   SYNOPSIS
  SAVE( )

   FUNCTION
  Saves the current project. Displays a requester if the project
  is unnamed.

   INPUTS
  None.

   RESULT
  Returns error 10 if error saving file.

   EXAMPLE
  'SAVE'

   NOTES

   BUGS

   SEE ALSO
  SAVEAS()

@endnode
@node "SAVEAS" "MPMorph/SAVEAS"

SAVEAS :


   NAME   
  SAVEAS - Saves the current project.

   SYNOPSIS
  SAVEAS( FILENAME/K COPY/S)

   FUNCTION
  Saves the current project using the supplied filename.

   INPUTS
  FILENAME - Name to save as. If not supplied then requester is displayed.
  COPY     - If supplied then save a copy, no gui errors, no recording,
             no icon, no updating filename, don't updated saved (V4.4)

   RESULT
  Returns error 10 if error saving file.

   EXAMPLE
  'SAVEAS FILENAME=ram:test.p'

   NOTES

   BUGS

   SEE ALSO
  SAVE()

@endnode
@node "SCALE" "MPMorph/SCALE"

SCALE :


   NAME   
  SCALE - Scales the size of the points and rendered output.

   SYNOPSIS
  SCALE( X/K/A/N,Y/K/A/N,FORCE/S )

   FUNCTION
  Changes the size of the rendered output and scales the defined points
  to the new size. Displays a requester if the project is not currently
  saved.

   INPUTS
  X     - New width.
  Y     - New Height.
  FORCE - Prevents the unsaved project requester.

   RESULT
  Returns error 10 if X or Y are supplied as zero, or the unsaved
  project requester is cancelled.

   EXAMPLE
  SCALE X 640 Y 512

   NOTES

   BUGS

   SEE ALSO
  SETSIZE().

@endnode
@node "SETATTR" "MPMorph/SETATTR"

SETATTR :


   NAME   
  SETATTR -- Sets the attributes of a variable etc.

   SYNOPSIS
  SETATTR( NAME/A,VALUE/A )

   FUNCTION
  Sets the current value of a specified field.

   INPUTS
  NAME    - Name of variable to set attributes for:
              FILE1      - the first workbench image file;
              FILE2      - the second workbench image file;
              FILE241    - the first 24 bit image file;
              FILE242    - the second 24 bit image file;
              OUTPUT     - the output file name;
              SINGLE     - the type of morph
                           0 - Morph, 1 - Warp
                           2 - AnimMorph, 3 - AnimWarp;
              FRAMES     - the number of frames;
              START      - the start frame;
              SAVED      - Update file saved status (V4.4)

   RESULT
  Returns error when required.

   EXAMPLE
  SETATTR FRAMES 10

   NOTES
  To set the image size use SETSIZE() or SCALE().

   BUGS

   SEE ALSO
  GETATTR(), SETSIZE(), SCALE().

@endnode
@node "SETCURR" "MPMorph/SETCURR"

SETCURR :


   NAME   
  SETCURR -- Sets the current value for the progress

   SYNOPSIS
  SETCURR( N/A/N )

   FUNCTION
  Sets the current progress.

   INPUTS
  N - The current progress.

   RESULT
  None.

   EXAMPLE
  SETCURR 50

   NOTES

   BUGS

   SEE ALSO
  SETMAX(), SETMESSAGE().

@endnode
@node "SETMAX" "MPMorph/SETMAX"

SETMAX :


   NAME   
  SETMAX -- Sets the current maximum for the progress

   SYNOPSIS
  SETMAX( N/A/N )

   FUNCTION
  Sets the maximum progress.

   INPUTS
  N - The maximum progress.

   RESULT
  None.

   EXAMPLE
  SETMAX 100

   NOTES

   BUGS

   SEE ALSO
  SETCURR(), SETMESSAGE().

@endnode
@node "SETMESSAGE" "MPMorph/SETMESSAGE"

SETMESSAGE :


   NAME   
  SETMESSAGE -- Sets the progress message.

   SYNOPSIS
  SETMESSAGE( MESSAGE/A )

   FUNCTION
  Sets the progress message.

   INPUTS
  MESSAGE - The message to display.

   RESULT
  None.

   EXAMPLE
  SETMESSAGE "Working..."

   NOTES
  May need to use non-break-spaces

   BUGS

   SEE ALSO
  SETCURR(), SETMAX().

@endnode
@node "SETSIZE" "MPMorph/SETSIZE"

SETSIZE :


   NAME   
  SETSIZE - Changes the size of the rendered output.

   SYNOPSIS
  SETSIZE( X/K/A/N,Y/K/A/N,FORCE/S )

   FUNCTION
  Changes the size of the rendered output. Deletes points outside the new
  image size. Displays a requester if the project is not currently saved.

   INPUTS
  X     - New width.
  Y     - New Height.
  FORCE - Prevents the unsaved project requester.

   RESULT
  Returns error 10 if X or Y are supplied as zero, or the unsaved project
  requester is cancelled.

   EXAMPLE
  SETSIZE X 320 Y 256 FORCE

   NOTES

   BUGS

   SEE ALSO
  SCALE().

@endnode
@node "TRIANGULATE" "MPMorph/TRIANGULATE"

TRIANGULATE :


   NAME   
  TRIANGULATE -- Deletes all lines and redraws using triangles.

   SYNOPSIS
  TRIANGULATE( FORCE/S )

   FUNCTION
  Deletes all existing lines and then creates triangles joining all the 
  points. Displays a requester if the current project is not saved.

   INPUTS
  FORCE - Prevents the unsaved project requester.

   RESULT
  Returns error 10 if the image windows are not open, or other error.

   EXAMPLE
  'TRIANGULATE FORCE'

   NOTES

   BUGS

   SEE ALSO
  ADDGRID().

@endnode
@node "UNLINKPOINTS" "MPMorph/UNLINKPOINTS"

UNLINKPOINTS :


   NAME   
  UNLINKPOINTS -- Unlinks two points.

   SYNOPSIS
  UNLINKPOINTS( X1/K/A/N,Y1/K/A/N,X2/K/A/N,Y2/K/A/N )

   FUNCTION
  Unlinks two points.

   INPUTS
  X1 - The X coord of point 1 in image 1.
  Y1 - The Y coord of point 1 in image 1.
  X2 - The X coord of point 2 in image 1.
  Y2 - The Y coord of point 2 in image 1.

   RESULT
  Returns error where relevant.

   EXAMPLE
  UNLINKPOINTS X1 5 Y1 5 X2 10 Y2 10

   NOTES
  The coords are of the points in image 1.

   BUGS

   SEE ALSO
  LINKPOINTS().

@endnode
@node "UNLOCKGUI" "MPMorph/UNLOCKGUI"

UNLOCKGUI :


   NAME   
  UNLOCKGUI - Allows user input.

   SYNOPSIS
  UNLOCKGUI( )

   FUNCTION
  Allows gui input after LOCKGUI().

   INPUTS
  None.

   RESULT
  None.

   EXAMPLE
  'UNLOCKGUI'

   NOTES

   BUGS

   SEE ALSO
  LOCKGUI().

@endnode
