CONTENTS

Using clip arts

Cliparts are GIF in PNG, or JPEG images which the user can insert in his/her drawing. There are 2 methods to display cliparts for insertion.

Builtin clip arts

Copy your clipart files in the subdirectory cliparts of the applet's directory and specify their names with the parameter "cliparts", for example:

<param name="cliparts"  value="flower.gif, bird.gif, cat.gif" >

You can keep your cliparts in a diffrent directory. In that case specify it with the applet's parameter clipart_dir relative to the applet's directory.

By default cliparts dropped on the canvas can be resized or rotated. If you don't want the user do it disable it with the applet's parameter paint_options, for example:

<param name="paint_options"  value="cliparts_resizable:false; cliparts_rotatable:true;" >

 

External cliparts

Any <img> tag on the same page can be used as a clipart provided that:

The function clipartDragger is defined in the file clipartdragger.js
which is located in the applet's directory and should be included in your page.

Example:

    <script language="javascript" src="../applet/clipartdragger.js"></script>
    ....
    <table><tr>
        <td><div><img src="myclipart1.gif" onmousedown="clipartDragger(event)"/></div></td>
        <td><div><img src="myclipart2.gif" onmousedown="clipartDragger(event)"/></div></td>
    </tr></table>

The function clipartDragger has the second (optional) parameter.
If it is set to false the editor applies this clipart (when dropped to the canvas) instantly
and doesn't allow scaling or rotatating it, for example clipartDragger(event,false).