TMMPlot

This Delphi-Component allows the user to easily display a HPGL/2-plot on a form,
paintbox or printer canvas. Free definable pencolors.

The functionality is comparable to the mediaplayer. The component has no own
canvas but needs a canvas to display the graphics. Pencolors and penstyles are
set automatically, other canvasoptions have to be preset.

Advanced Version includes zoom & pan.
Professional Version includes print-2-scale.

LIST OF FILES.

	    File                    Description

	TMMPlot.TXT      Software Documentation (this file).
 	TMMPlot.REG      Registration form.
 	TMMPlot.DCU      Component object code.
 	TMMPlot.DCR      Component resource file.
 	MMPlot.EXE       Viewer based on TMMPLOT (professional)
 	MMPlot.TXT       Software Documentation (Viewer).
 	MMPLOT.DLL       DLL required from TMMPLOT and MMPlot.EXE
  (It is recommended to copy MMPlot.DLL into your WINDOWS or SYSTEM directory)
 	DEMO.DPR         Demo project file
 	DEMO.RES         Demo project resource file
 	MAIN.PAS         Demo unit
 	MAIN.DFM         Demo form
 	SAMPLE.PLT       Demo-Plotfile.

PROPERTIES

-Published-

Active: boolean      Active=true opens a file and projection is enabled.

Display: tpaintbox   The projector screen can be selected. If no paintbox is
                     available/selected, the parent form will be the display.

GraphDir, GraphName: string    Plotdirectory and HPGL-Sourcefile

MapMode: TMapMode    Show Plot in isotropic/anisotropic mode

Name: TComponentname

Options: TGraphOptions Various graphic options can be set as there are:
[**]                             goPrint       : Output to Printer
[**]                             goOrigScale   : Print in original scale
[**]                             goGrid        : Display pageframes on screen.
[**]                             goPageNums    : Print Pagenumbers on the different sheets.

Startpage, Endpage, PrintCopies: word
[**]                             See TReport....

Painttiming: TPaintTiming
                                 This depicts when the OnPaint-eventhandling will be
                                 executed in relation to Display.OnPaint.
                                 Possible values are:
                                 ptBefore : Before Display.OnPaint
                                 ptReplace: Instead of Display.OnPaint
                                 ptAfter  : After Display.OnPaint

Pen1...Pen8: tcolor   plotter - pencolors

Title:string         Title displayed in printmanager


-Public-

Version : string     RevisionCode  ( 16.02e = 16bit-revision 2-english )
Error   : string     Display Errortext and clear it (if any)
Filename: string     HPGL-file with complete path

METHODS

constructor Create(AOwner: TComponent);
destructor Free;
procedure Close;                      Close Plotfile
procedure ZoomAll;                    Reset Zoom, Refresh
procedure SetZoom( r : trect );       Zoom-In
procedure Pan    ( r : trect );       Pan
function SaveFileAs(newname:tfilename):boolean;  Save Plotdata in binary file
                                                    Returns TRUE if ERROR !!!
procedure Hardcopy;                  Hardcopy in actual mode (no Zoom)
function Size( Var mmx,mmy   : longint;
               Var PageCount : word
              ):boolean;    { true = ERROR }
           Returns the Dimensions of the Plot and the amount of printer pages
           it would take to print the whole thing in original scale.
function  Info( p : pPlotInfo ):boolean;
            Provides more details concerning the plot in the following structure:

  plotInfo = ^tPlotInfo;              { pointer on struct }
  type tPlotInfo = record
     mmx, mmy,                        { Dim [mm] }
     plxmax,                          { Max x [plotunit] }
     plymax,                          { Max y [plotunit] }
     plxmin,                          { Min x [plotunit] }
     plymin : longint;                { Min y [plotunit] }
     penbuf : array[0..255] of byte;  { used pens (penbuf[0]=highest penNr) }
                                      { penbuff[i] > 0 = pen i used }
     pages  : word;                   { required page# on actual printer }
  end;


Installing TMMPlot

To install this VCL, copy both MMPlot.DCU and MMPlot.DCR to the
directory where you have your other shareware controls.  Then,
from Delphi's main menu, select Options|Install Components.  In the
dialog, click on the Add... button, then Browse... and change to the
drive/directory where you stored the above two files.  Select
MMPlot.DCU and click OK, then OK again.
Copy MMPLOT.DLL into Your outputdirectory for your EXE or DLL or to
Your Windows or System directory (recommended for Designers).
The component needs MMPLOT.DLL to interpret HPGL-files.  The DLL
is dynamically loaded and may not be needed if the plot is "precompiled".
See section below for more information.

Using TMMPlot

To use this control, simply place it on your form, and edit the
Graphname, Options, Pens and Display properties.

You can use TMMPLOT without MMPLOT.DLL in certain circumstances.
Raw graphic data is saved in a temporary binary file (Property FFilename).
You can display this kind of file (*.TMP;*.DAT) without the use of the DLL.
Loading is much faster and the DLL is not required.
The demo shows how to do this. Action: Save as xxx.dat..., then open this
file...

Procedural interface

Function PlotSizeFromFile( Filename : tfilename;    plotfile
                       Var mmx,                     plotwidth [mm]
                           mmy      : longint;      plotheight [mm]
                       Var PageCount: word          # printer pages
                             ):boolean;             true if ERROR !!!

Function PlotInfoFromFile( FName   : tfilename;
                           p       : pPlotInfo):boolean; true if ERROR !!!

Function OutPlot( Filename : tfilename;
                  Canvas   : tCanvas;              { Outputcanvas }
                  CParent  : tObject;                { Form,Printer,Picturebox...}
                  MapMode  : Longint;            { 0 = isotropic, 1 = Anisotropic }
                  StartPage,                             { [**] print-to-scale only }
                  EndPage  : integer;               { [**] print-to-scale only }
                  ):boolean;

Function GetDLLVersion:String   ( 16.02e = 16bit-revision 2-english )

Further options  [**]

 Zoom & Pan is not included in the lite version.
 It is planned to release a professional version including print-to-scale but no price is
 fixed now. Send-to-Port will also be included in the pro-version.
 The component is designed to display on paintboxes or the form but
 any canvas is possible as output media. Please feel free to contact
 me if You have any special needs.

Benefits of Registration

 Most HPGL/2 language is implemented. Registered users are supported if
 they have any problems with a special plotformat.
 The unregistered component includes from time to time a shareware message
 into the output.
 Registered users have the right to distribute the component as part of their
 applications.

Registering TMMPlot

To register TMMPlot lite, send $85 (+$8 S&H) to:

MAMAVISION Software Consult
Wollmatingerstr. 70B
78467 Konstanz
*** Germany ***

or register in Compuserve:   GO SWREG 9785

Please report all bugs, suggestions, and problems to:

Markus Mayer
Compuserve ID: 100335,430
Internet adress: 100335.430@CompuServe.com

You can save the $8 shipping fee by specifying a Compuserve
account to have your control sent to instead of by mail.

Although TMMPlot functions flawlessly on our computer systems the
authors assume no responsibility for the use or misuse of the component.
This package may be copied and distributed freely providing that it is
not modified, no fee is charged, and it is not made part of a package for
which a charge is made.  If you upload this package to other bulletin boards,
we'd appreciate it if you would try to keep the upload current.

TMMPlot is (c)1996 copyright by MAMAVISION Software Consult 