Brief Notes on Mayura Draw

Brief Notes on Mayura Draw
K C Ang
1 Introduction
Mayura Draw or MDraw is a powerful drawing program. Using MDraw you can create illustrations composed of graphical shapes such as rectangles, ellipses, polygons, bezier curves, and
text. MDraw has powerful tools for drawing, editing and transforming graphical objects. After
you have drawn a few objects, you can select an object or a group of objects, and transform
them. Objects can be edited even after transformation. To edit an object, select the object and
drag any of the handles that become visible. A typical starting window looks like the following:
Menu bar
Tool bar
Drawing Tools
Drawing
Space
Instructions for
selected tool
Figure 1: A typical starting window
MDraw has the usual menu bar and tool bar like most Windows applications. Most of the
buttons on the menu bar should be quite self-explanatory. The tool bar has items which are
similar to other drawing applications such as MS Paint.
1
Figure 2: Drawing Tools
The buttons on the left of the window shown in Figure 1 are the
drawing tools that are available (as shown in Figure 2).
These are the usual vector graphics tools for selecting, scrolling and
zooming in/out, and for drawing line segments, rectangles, ellipses
(and circles), arcs, bezier curves and polygons. In addition, one can
also add text to the drawing, and scale, rotate or reect objects in
the drawing.
To assist the user, once a drawing tool button is selected (clicked),
instructions on how to use it will be displayed at the bottom of the
window.
Online help is available by clicking the Help menu item.
2 Exporting your drawing
Drawings created using Mayura Draw can be included in other documents created using LATEX
Microsoft Word or other word processors. This is done by \exporting" the drawing to another
format, such as the encapsulated postscript (eps) format for LATEX or windows metale (wmf)
format for MS Windows applications.
To save your drawing in wmf format, select Export from the File menu. Then change the \Save
le as" type to wmf. The wmf le can then be inserted into a WSIWYG word processor such
as MS Word.
Similarly, to export to an eps le, select eps as the le type to save in. Note that when prompted
for a lename, one needs to type the lename including the extension, for instance \pic.eps".
2
3 Some Examples of Imported drawings
The gures below are some examples of drawings that were created using MDraw.
START
Create / Edit
source document
.tex
.aux
Process LaTeX
document
.log
.dvi
Convert to
postscript (dvips)
View / Print
dvi file
View / Print
postscript file
END
.ps
Figure 3: Flow Chart for producing a LATEX document
y
y
y = f(x)
xxxxxx
xxxxx
xxxxxx
xxxxx
xxxxxx
xxxxx
xxxxx
xxxxx
xxxxxx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xx
xxxxxx
xxxxxx
xxxxxx
xxxxxx
xxxxxx
xxxxxx
Area= f (x*k ) ∆ x
x*k
∆x
x=0
xxxxx
xxxxx
xxxxx
xxxxx
xxxxx
xxxxx
xxxxx
xxxxx
xxxxx
xxxxx
xxxxx
xxxxx
xxxxx
xxxxx
xxxxx
xxxxx
xxxxx
u(x,t)
Figure 6: A wave
Figure 4: Riemann Sum and Integration
3
x=L
x
4 Inserting images from other applications
MDraw allows the user to insert images from other applications. Unfortunately, the only image
format that it accepts is the Windows bitmap (bmp) format. Images in other formats such as
gif, jpg, ti, wmf and so on must rst be converted to bmp format (using an image viewer or
editor, such as MS Photo Editor, LViewPro and so on).
Suppose a chart has been created using an application like EXCEL97 and needs to be inserted
into a LATEX document as an eps le. This may be achieved using MDraw and MS Paint (which
comes with MS Windows 95) by following the steps below:
1.
2.
3.
4.
5.
6.
7.
Right-click the chart. A pop-up menu will appear.
Choose the Copy option from the menu.
Start MS Paint (Click Start - Programs - Accessories - Paint).
On MS Paint, Choose Paste to paste the copied image.
Save the le as a bitmap le, with a .bmp extension in the lename.
Start MDraw, and select Edit - Insert ... from the menu bar.
A dialogue box will appear and you can then specify the lename of the bitmap image to
be inserted.
8. Before saving or exporting, you may wish to re-size the inserted image from MDraw's
Arrange - Transform - Scale ... menu item.
9. Export the le as an eps le.
Note:
You may use other image editors and not necessarily MS Paint to paste the copied image. The
important thing is to be able to convert the image to a bmp le.
Screenshots like those found in this document can be inserted in a similar fashion. In this case,
we use a screen capture application (such as HyperSnap) to capture the image from the screen
and save it as a bmp image. We can then proceed from Step 6 onwards.
Caution!
Although this method works, the resulting le is usually very large. This is because the image
pasted is in Windows bitmap format, which usually takes up a lot of space in the rst place.
The resulting eps le hence becomes very large.
If one wishes to plot a graph to be included as a gure in a LATEX document, it is better to use
an application which can output directly to an eps le. Applications such as gnuplot or S-Plue
allow users to specify the output format, including eps.
4
5 Technical information for advanced users
eps is the format preferred by high-end desktop publishing systems. Unlike WMF and other formats, eps uses PostScript, a powerful graphics language used by high-end typesetting machines
costing tens of thousands of dollars, such as Linotype, as well as cheaper laser printers costing
under $1000, such as Hewlett Packard LaserJet 5MP.
EPS stands for Encapsulated PostScript. An Encapsulated PostScript le contains PostScript
code designed to be included as a part of another page, rather than being sent to a PostScript
printer directly. All eps les contain PostScript code. However, PostScript code is in general
only understood by printers equipped with a PostScript interpreter. Word processors do not
understand PostScript code, and therefore cannot directly display PostScript les on the screen.
To solve this problem, eps les may contain a preview bitmap in addition to the PostScript code.
When you insert an eps le into a word processor, your word processor ignores the PostScript
code that it cannot understand, and instead depends on the preview bitmap to display the
drawing on the screen. But when the word processor prints the document, it sends the PostScript
code to the printer instead of the bitmap. This assumes your printer can understand PostScript.
If it cannot, the word processor sends the preview bitmap to the printer, resulting in poor quality.
Not all eps les contain preview bitmaps. When you insert an eps le which does not contain a
preview bitmap into a word processor, the word processor will not be able to display the drawing
on the screen. Your word processor may instead display some details about the eps le such
as its name and the date it was created. Even though the eps le does not contain a preview
bitmap, it still contains all the PostScript code necessary to print the picture. So when you print
the document, the word processor sends the PostScript code to the printer and the drawing will
appear in the output. Again, this assumes that your printer is a PostScript printer. If it is not,
the word processor will not be able to print the graphic.
5