home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
wps
/
graphic
/
pmpaint2
/
pmpaint.doc
next >
Wrap
Text File
|
1993-02-16
|
17KB
|
357 lines
PmPaint Version 1.20.1 (C)1991 by Mitchell Fisher 02-16-93
O V E R V I E W:
____________________________
PmPaint is a very simple paint program for the OS/2 Presentation
Manager. The purpose for this program was to aid in the developement of
graphic images (MetaFiles) for a game I am writing and planning to convert
to OS/2 - so this program is actually one of my many developement tools.
However, I find this program to be appropriate enough to send out for
other people to use since it may be useful to them.
PmPaint allows the user to generate simple to complex vector images
consisting of lines and filled areas. These images are stored in memory
in a special PmPaint format but when you save it you have the option to
save the Image as a metafile. Note, however, that you cannot load the
metafile back into memory for re-editing so therefore the image is saved
as a PmPaint file as well. Currently, the PmPaint files are actually
smaller in size than its associated metafile, however, you must use
PmPaint to view it and cannot access it through OS/2 as easily as
matafiles.
(Please view the FUTURE section about PmPaint V 2.00 and problems this
special revision corrects).
F U N C T I O N S:
___________________________
PmPaint is very simple to use, however, certain rules must be
understood before using the program. First of all, the program does not
draw bitmap images - It draws VECTOR images which means your images are
made up of lines and filed areas (Similar to what a plotter does).
However, do not think that this is a drawback - True it may be more
difficult to draw vector images but, generally, vector images will consume
much less memory than most Raster image. Also, if this means anything to
your use of a paint program, vector graphics are somewhat faster to draw
than raster image in OS/2.
Following is a description of the functions of PmPaint 1.20. In the
future there are plans to enhance what functions there are and to add new
and more powerfull functions and to eventually exploit as many of the GPI
functions of the Presentation Manager as possible.
Here are the graphic functions available through PmPaint 1.20:
1. Line Drawing
2. Moving Draw Position
3. Filling in areas
4. Creating curves
5. Drawing lines via GpiPolyLine.
6. Drawing Boxes
7. Changing Colors
8. Changing Fill Patterns.
9. Deleting Items
Furthermore, there are these operation functions:
10 . Loading Pre-made graphics.
11. Saving your work
12. Drawing the graphic to the window size.
13. Misc. functions
NOTE: Currently PmPaint does not support Line Width Sizes beyond
the default which is 1 pel in width except in the use of Path
Brackets. Path brackets are not active in PmPaint Version
1.20 but will be supported later versions.
1. Line Drawing.
Line drawing is the basis of PmPaint. The mouse controls line
drawing. The Button 1 (Left Button) draws a line from the
current draw position to the current mouse position. The draw
position is then set to the end of the line.
2. Moving the draw position.
To draw a line a draw position must be provided to start the
line and the ending coordinates must be provided. To set the
draw position press Button 2 (Right Button). Now the line can
be drawn from the draw position to the mouse position.
3. Filling in Areas.
Filling in areas with PmPaint is similar to a tradition paint
program - you create your figure, select a fill function, and
click your mouse anywhere in the area to be filled. If you
left an open hole, TOO BAD - you might have just filled the
entire screen.
With PmPaint all you have to do is:
A. Position you drawing position to the place where you
want to start your filled area.
B. Select Begin area from the Special Drawing menu.
C. Draw your figure. You do not have to end your figure
exactly at the start point since when you end the
area, OS/2 PM does it for you, by closing the figure
from the last point to the first point.
D. Select End Area from the Special Drawing Menu and
WHAM! you have a filled figure!
Of course you can decide what color you want this figure to be
and with what fill pattern.
SPECIAL: After beginning an area bracket, you can also begin
other graphic functions such as boxes or curves.
You must then end the special drawing function then
end the Area Bracket. This will allow the creation
of filled Boxes, arcs and PolyLine shapes.
4. Drawing Curves.
PmPaint 1.20 has a very simple way to draw curves:
A. Position you drawing position to where you want to
start the curve.
B. Select Begin Fillet under the Special Drawing menu.
C. Draw you lines ending at points where you want curves
to be drawn.
D. Selecr End Fillet under the Special Drawing menu and
BEHOLD! a curved line...
Curved lines or Fillets as they are called can be any color
and can also be used inside an Area Bracket. To use inside
and Area:
A. Begin the Area.
B. Begin a Fillet wherever in the area bracket you want
it started.
C. Draw your figure.
C. End the Fillet. The image you have drawn will
dissappear. Don't worry, it's not really gone.
D. End the Area. Now your invisible line reappears with
the Fillet drawn as well.
IMPORTANT:
The way a Fillet is implimented in GPI, it must have an
array of points to draw. Since that method of storing
points is not used by PmPaint, a limitation of 255
points has been set for each Fillet drawn. Any points
added after 255 are not drawn as part of the Fillet. A
high tone will be generated for every point set after
255.
PmPaint version 1.01 and above support the Arc command that
allow the creation of an arc which is much more asymetric
than the fillet. The same procedure is used to create an arc
as is s fillet, however, three points ar necessary.
5. Drawing lines with PolyLine.
PmPaint supports two types of drawing modes, one as the
default by just pointing and clicking the mouse without
selecting any options, and two - the PolyLine.
A PolyLine is a GPI function that draws several line segments
given an array of points. PolyLine is much faster at drawing
several contiguous line segments than drawing a single line at
time with the default draw mode. To start a PolyLine just
select Begin PolyLine from the Special Drawing menu and draw
the figure as you would normally.
Note, however, that you cannot move the draw pointer while in
a PolyLine mode, if you do the point you move to will act as
just another point at which to draw to and a line will be
drawn to it - Remember a PolyLine is a CONTIGUOUS set of
lines.
When done drawing the PolyLines, select End PolyLine to end
the use of the PolyLine function:
PolyLine can be used inside an Area Bracket as well. Just
follow the steps outlined in for Fillets but instead of using
the Fillet, us the Begin and End PolyLine functions.
IMPORTANT:
The way a PolyLine is implimented in GPI, it must have
an array of points to draw. Since that method of
storing points is not used in PmPaint directly, a
limitation of 255 points has been set for each PolyLine
figure drawn. Any points added after 255 are not drawn
as part of the PolyLine. Also, the End PolyLine command
will not automatically be set for you at this limit. A
high tone will be generated for every point set after
255.
6. Drawing Boxes
PmPaint allows a very easy and simple way to draw boxes.
First, move the mouse pointer and mark the location where you
would like to place the LOWER LEFT corner of the box (Select
the location by moving the draw position to that location).
Next, select "Begin Box" from the menu. Notice that your
location you selected is marked with an "x". Now either draw
a line or move the draw position to where you would like to
have the TOP RIGHT corner of the box. Now, select "End Box"
from the menu and - bingo - a box. You can also use the box
command within an area bracket to get a filled box. The box
command will not within Fillets, Poly Lines, or curves.
7. Changing Color.
To change the color of the current draw pointer just select
the color you like from the Color menu. When you change the
drawing color, the Fill Patterns window will reflect your
color choice by changing the color of the current fill
pattern.
NOTE: The older versions of PMPAINT (Prior to 1.20)
added a color command to the list of commands
stored in the picture whether the previous commands
was setting the color also, however, PMPAINT
version 1.20 and above will not do this. If the
last command selected was to change the color, then
the old node is updated instead of a new one added.
8. Changing Fill Patterns.
To change the fill pattern just click the Left mouse button
on top of the Fill Patterns Window. Pressing the Right mouse
button (Button 2) will go to the previous fill pattern. The
visible pattern is what will be used for the next fill.
9. Deleting Items.
Deleting items in PmPaint is Primitive but effective. You can
either delete the last line, Area, Fillet, or PolyLine you
created by selecting the Options, Delete, Last Command
function or by pressing Control-D.
Any Area, Fillet, PolyLine or Box, that requires you to select
a begin command on will be deleted from the start of that
command (The Begin ??? Command) to the end of that command
(The End ??? Command).
Note: You cannot delete something whenever you have Begun an
Area Bracket, Fillet, or PolyLine. You must end the Bracket,
Fillet, or PolyLine in order to delete it.
A second way to delete something is to select the command to
delete the last fill (CTRL-F) under the Options, Delete,
Last Fill command. When this is chosen the last thing that
was filled (i.e an Area Bracket) will be deleted even if it
was not the last command executed.
10. Loading Pre-made graphics.
To load Pre-Made graphics, just press Control-L or select LOAD
from the File menu. Only graphics with the .PMP can be
loaded. These files are special to the PmPaint program only.
METAFILES CANNOT BE LOADED - sorry. However, any files loaded
as a PmPaint file can be saved as a MetaFile as well as the
PmPaint file.
After Loading a file, the mouse pointer will be positioned to
the last location drawn.
11. Saving your work.
To save your work, just press Control-S or select SAVE from
the file menu. When you save, you have the options of saving
a MetaFile of the drawing as well. Note that the PmPaint
format will always be saved and by checking the box for
MetaFile save, you save a MetaFile as well.
NOTE: When saving or loading a file, DO NOT supply an
extension after the FilName - PmPaint does that for you and
assumes that the filename does not have an extension. If you
add an extension, the file will not be saved or loaded.
IMPORTANT!
PMPAINT supports the use of Long File names for use with the
HPFS for saving and loading of PmPaint Files.
Also, PmPaint version 1.10 and above uses list boxes for
filenames and directories instead of having to enter the
filename at a prompt. However, PmPaint does not warn you if
you are going to overwrite another file, you must make sure
everything is alright before saving.
12. Drawing the graphic to the window size.
If you change the Window Size you can view what you have drawn
to fill the entire window for VIEWING only. Your graphic can
be reduced or enlarged. The original purpose of this was to
aid in my design of the OS/2 game as described at the start of
this document. To view the picture at normal size, either hit
CTRL-W again or adjust the size of the window so OS/2 can
repaint your drawing to the original size.
13. Misc. functions
The miscellaneous functions include Hiding the Coordinate box
and moving the mouse pointer to the current draw pointer.
These functions should be self-explanitory.
T H E F U T U R E
___________________________
As stated above, PmPaint will feature more functions in the future
and try to exploit as many if not all of the GPI functions available to
the Presentation Manager.
Furthermore, in the works are functions to draw circles, elipses,
arcs, etc. all with the possibility of being filled or not. Also, I plan
to add features to change the line type.
Currently, I am working on PmPaint V 2.00. This will be entirely
re-written for the 32-bit OS/2 2.0. This new version will have a better
interface and will allow importing and editing of metafiles, the PmPaint
specific files will no longer be used - just .MET files (A conversion will
be supplied of course). PmPaint 2.0 will allow the creation of ELEMENTS
and allow the user to rotate and size to be placed into an existing
picture (Metafile). Also, fonts and bitmaps will be supported. I plan to
release this version into public domain in the latter part of 1993 or
early 1994.
Thank you for supporting PmPaint and registering the software. There is a
lot of hard work that goes into a simple program such as PmPaint and to
register the software gives me the incentive to write more software for
OS/2 PM for all of you users out there. All the programs written by me
and registered will always come with source code for you to learn from and
add to and experiment with. If you have any questions or problems with
the programs, please correspond to me at the following address:
This release fixes a problem in loading and saving files in which OS/2 2.0
would abend. PmPaint will still work in OS/2 1.3.
Please send all correspondence to:
Mitchell Fisher
3940 W. 77th Place Apt #21
Merrillville, IN 46410