⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 customtools.htm

📁 applet在線上繪圖,允許在瀏覽器上繪圖,最後儲存成各式的圖檔
💻 HTM
字号:
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <title>Custom tools</title>
<link REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</head>
<body>
<a href="./index.htm">CONTENTS</a>

<h3>Custom tools</h3>

<p>You can create custom tools for the <a href="placing.htm#Tool">Tool Panel</a>.
Custom tools allow users to choose a basic tool (such as line, rectangle, ...), color, and pen by one mouse click.</p>

<p>Say you wish to allow your users to draw roads and rivers on a map.
   <br>
   Roads should be drawn with the <a href="placing.htm#Tool">line</a> tool, <nobr>in red color (#FF0000)</nobr>,
   and the pen <a href="placing.htm#Pen">thick_rect2</a>.
   <br>   
   River should be drawn with the <a href="placing.htm#Tool">curve</a> tool,
   <nobr>in red color (#0000FF)</nobr>, with the pen <a href="placing.htm#Pen">thick_rect1</a>.</p>

<p>To implement these tools you have to do the following:</p>

<ol>
    <li>Prepare a <a href="icons.htm">custom icons</a> for the road and river tools,
        and name thier files road.gif and river.gif.
    </li>
   
    <li>Include the words <b>road</b> and <b>river</b> in the tool list defined
        by the parameter <b>tool</b> of the <a href="placing.htm#Tool">Tool Panel</a>:
    </li>

    <li>Describe the new tools using parameters <b>road</b> and <b>river</b>.
        The values of the parameters must be specified as:
       <nobr><i>basic_tool, color, pen</i></nobr>
    </li>
</ol>

Here is an example code describing the new custom tools:
       <pre>
       &lt;applet code="ControlPanel.class" ... &gt;
           &lt;param name="tools" value="road, river"&gt;
           &lt;param name="road"  value="line, #FF0000, thick_rect2"&gt;
           &lt;param name="river" value="curve, #0000FF, thick_rect1"&gt;
           ...
       &lt;/applet&gt;
       </pre>

<p><b>Note:</b> Custom tools can be used as an alternative to the basic tools, colors and pens.
Don't display the ColorPanel, and PenPanel if you're using custom tools, and don't mix custom
and basic tools on the tool panel.
</p>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -