biarea.html

来自「ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.」· HTML 代码 · 共 305 行

HTML
305
字号
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><!--Generated using api.website.xsl version 2003-07-17--><head><META http-equiv="Content-Type" content="text/html; charset=utf-8"><title>BiArea</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type="text/css" rel="stylesheet" href="api.css"><script type="text/javascript">				function showDerivedClasses() {					var ul = document.getElementById("api-derived-classes");					var lis = ul.childNodes;					var l = lis.length;					for (var i = 1; i < l; i++)						lis[i].style.display = "";					lis[0].style.display = "none";				}			</script></head><body><h1 id="BiArea">BiArea</h1><p>This class represents an area with a given left, top, width and height</p><p>This class extends		<code><a href="BiObject.html">BiObject</a></code>		and therefore all methods and fields available for		<code><a href="BiObject.html">BiObject</a></code>		are also available for <code>BiArea</code>.</p><ul class="partial-class-tree"><li><code><a href="BiObject.html">BiObject</a></code><ul><li><code>BiArea</code><ul id="api-derived-classes"></ul></li></ul></li></ul><h2>Constructor</h2><p><code>	new BiArea(<span class="methodArgument">nLeft</span>, <span class="methodArgument">nTop</span> [, <span class="methodArgument">nWidth</span> [, <span class="methodArgument">nHeight</span>]])</code></p><h3>Parameters</h3><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>nLeft</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The left positon</td></tr><tr><td><code>nTop</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The top positon</td></tr><tr><td><code>nWidth</code></td><td><code class="type">Number</code></td><td class="optional-column"><img src="check.png" alt="checked"></td><td><code>1</code></td><td>The width </td></tr><tr><td><code>nHeight</code></td><td><code class="type">Number</code></td><td class="optional-column"><img src="check.png" alt="checked"></td><td><code>1</code></td><td>The height </td></tr></tbody></table><h2>Properties</h2><table><thead><tr><td>Name</td><td>Type</td><td class="get-header">get</td><td class="set-header">set</td><td>Descripton</td></tr></thead><tbody><tr><td><a name="height"></a><code>height</code></td><td><code class="type">Number</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>The height of the area</td></tr><tr><td><a name="left"></a><code>left</code></td><td><code class="type">Number</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>The left postion of the area</td></tr><tr><td><a name="top"></a><code>top</code></td><td><code class="type">Number</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>The top postion of the area</td></tr><tr><td><a name="width"></a><code>width</code></td><td><code class="type">Number</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>The width of the area</td></tr></tbody></table><h2>Methods</h2><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td><code><a href="#contains">contains</a></code></td><td>Tests whether this area completely encloses another area</td></tr><tr><td><code><a href="#equals">equals</a></code></td><td>Whether this area is representing the same area as another</td></tr><tr><td><code><a href="#hitTest">hitTest</a></code></td><td>Tests whether a point is inside the area</td></tr></tbody></table><h2>Events</h2><p>None.</p><h2>Static Methods</h2><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td><code><a href="#enclose">enclose</a></code></td><td>This takes two areas and returns another area that completely encloses both these areas</td></tr></tbody></table><h2>Static Fields</h2><p>None.</p><h2>Remarks</h2><p>	</p><h2>Method Details</h2><h3><a name="contains"></a>contains</h3><p>Tests whether this area completely encloses another area</p><h4>Syntax</h4><pre class="method-syntax">object.contains(<span class="methodArgument">a</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>a</code></td><td><code class="type">						<code><a href="BiArea.html">BiArea</a></code>					</code></td><td class="optional-column"></td><td></td><td>The area to test if enclosed</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</code></p><h3><a name="equals"></a>equals</h3><p>Whether this area is representing the same area as another</p><h4>Syntax</h4><pre class="method-syntax">object.equals(<span class="methodArgument">oArea</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>oArea</code></td><td><code class="type">						<code><a href="BiArea.html">BiArea</a></code>					</code></td><td class="optional-column"></td><td></td><td>The area to test with</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</code></p><h3><a name="hitTest"></a>hitTest</h3><p>Tests whether a point is inside the area</p><h4>Syntax</h4><pre class="method-syntax">object.hitTest(<span class="methodArgument">x</span>, <span class="methodArgument">y</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>x</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The x coordinate</td></tr><tr><td><code>y</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The y coordinate</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</code></p><h2>Static Method Details</h2><h3><a name="enclose"></a>enclose</h3><p>This takes two areas and returns another area that completely encloses both these areas</p><h4>Syntax</h4><pre class="method-syntax">BiArea.enclose(<span class="methodArgument">a1</span>, <span class="methodArgument">a2</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>a1</code></td><td><code class="type">						<code><a href="BiArea.html">BiArea</a></code>					</code></td><td class="optional-column"></td><td></td><td>The first area to enclose</td></tr><tr><td><code>a2</code></td><td><code class="type">						<code><a href="BiArea.html">BiArea</a></code>					</code></td><td class="optional-column"></td><td></td><td>The second area to enclose</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">					<code><a href="BiArea.html">BiArea</a></code>				</code></p></body></html>

⌨️ 快捷键说明

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