home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Direkt 1995 #1
/
Image.iso
/
cdd
/
winanw2
/
winrip
/
metafile.txt
< prev
next >
Wrap
Text File
|
1993-08-20
|
5KB
|
93 lines
Importing Windows Metafiles.
WinRIP Lite provides a facility which allows images in the form of a Windows
Metafile to be imported into the current editing window and converted to RIP
format. This is obviously a very powerful tool to aid you in producing high
quality images.
Before we get started on explaining how to go about import metafiles, there
are a few points of which you should be aware.
Metafiles are made up of Windows GDI drawing commands and mainly consist of
Polygons, PolyPolygons and PolyLines. PolyPolygons and PolyLines are unknown
in RIP, a PolyPolygon is a single GDI drawing command containing several
individual polygons, a PolyLine is also a single drawing command, but
containing several lines. Also, one problem with RIP is the restriction that a
polygon may only contain a maximum of 512 points, whereas a polygon GDI
command may contain thousands of points.
Obviously, WinRIP Lite has to provide a means of handling the PolyPolygon and
PolyLine GDI command conversions. This it does in the following way. A
PolyPolygon is actually output as a series of individual 'Polygons' in RIP
format, and PolyLines as individual 'Lines'. Nothing spectacular in this you
might say, but be warned, this has side effects! A PolyLine contains a series
of points each of which is connected together, as an example take the
following set of points to be the coordinates in a Polyline GDI command:-
{(0, 1)(2, 5)(20, 15)(27, 4)(30, 4)}
Now this set of points consists of 5 individual point in PolyLine format, but
consider what happens when this is converted to RIP:
!|L00010205|L02052015|L20152704|L27043004
NOTE: The individual points have not been converted to Mega Number format to
aid clarity.
You get four individual line drawing command in RIP format, each consisting of
10 characters (including the '|' character). The start point of the next
command is the same as the last point of the previous command. in other words
each point, except the very first and very last is specified TWICE.
RIP only allows for a maximum of 512 points to be specified in a Polygon, so
how does WinRIP Lite cope with the situation where there are more than 512
points in a GDI Polygon metafile command. Simple, WinRIP Lite converts the
polygon to a set of individual 'Line' commands along the same lines as the
example given above and adds an additional line command at the end of the
sequence to ensure that the polygon is 'closed, that is, that the last point
in the polygon is connected to the first.
Now you can see the potential danger... You can end up with a VERY large RIP
file. You are therefore advised to keep the number of imported metafiles per
RIP image to a minimum. You can see the effect of the conversion of two
metafiles by examining the file 'CHAPLIN.RIP' (included with WinRIP Lite).
This files contains to elements converted from Windows metafiles, the drawing
of Charlie Chaplin and the name WinRIP. Only the text "Charlie Chaplin brought
to you by" was actually entered in WinRIP. The file is almost 21k!
How to Import a Metafile.
From the pull down File menu click 'Import Image', you will be presented with
a 'File Open' dialog box containing a 'Directory List Box' and 'File List Box'
etc., from which you can select the file to be imported. Once you have
selected the file, the image will be displayed in the top left hand corner of
the screen together with a 'bounding box'. Note that the imported image may be
larger than the window. You will notice that a window is displayed containing
eight 'Radio Buttons'. Against each of these button is a scaling factor
allowing the imported image to be scaled by:
25%
50%
75%
100%
150%
200%
250%
300%
Select the scaling factor by clicking the appropriate radio button. This does
not immediately effect the displayed image, but the bounding box will change
size according to the scale factor selected. All scale factors are applied to
the size of the original image, i.e. scaling the image by 150% will scale the
image to 1.5 times it's original size, now if a further scaling factor is
selected that will be applied to the size of the ORIGNAL image. To accept the
new image size as defined by the bounding box, click the OK button.
The bounding box may now be dragged to position where the image is to be
pasted. To actually paste the image, click the right hand mouse button.