DSTEngine/hGameTest/node_modules/openfl/docs/classes/openfl.geom.rectangle.html
2025-01-15 19:28:55 +01:00

1261 lines
68 KiB
HTML

<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Rectangle | openfl</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">openfl</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../index.html">openfl</a>
</li>
<li>
<a href="../modules/openfl.geom.html">geom</a>
</li>
<li>
<a href="openfl.geom.rectangle.html">Rectangle</a>
</li>
</ul>
<h1>Class Rectangle</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>A Rectangle object is an area defined by its position, as indicated by its
top-left corner point(<em>x</em>, <em>y</em>) and by its width and its height.</p>
</div>
<p>The <code>x</code>, <code>y</code>, <code>width</code>, and
<code>height</code> properties of the Rectangle class are independent of
each other; changing the value of one property has no effect on the others.
However, the <code>right</code> and <code>bottom</code> properties are
integrally related to those four properties. For example, if you change the
value of the <code>right</code> property, the value of the
<code>width</code> property changes; if you change the <code>bottom</code>
property, the value of the <code>height</code> property changes.</p>
<p>The following methods and properties use Rectangle objects:</p>
<ul>
<li>The <code>applyFilter()</code>, <code>colorTransform()</code>,
<code>copyChannel()</code>, <code>copyPixels()</code>, <code>draw()</code>,
<code>fillRect()</code>, <code>generateFilterRect()</code>,
<code>getColorBoundsRect()</code>, <code>getPixels()</code>,
<code>merge()</code>, <code>paletteMap()</code>,
<code>pixelDisolve()</code>, <code>setPixels()</code>, and
<code>threshold()</code> methods, and the <code>rect</code> property of the
BitmapData class</li>
<li>The <code>getBounds()</code> and <code>getRect()</code> methods, and
the <code>scrollRect</code> and <code>scale9Grid</code> properties of the
DisplayObject class</li>
<li>The <code>getCharBoundaries()</code> method of the TextField
class</li>
<li>The <code>pixelBounds</code> property of the Transform class</li>
<li>The <code>bounds</code> parameter for the <code>startDrag()</code>
method of the Sprite class</li>
<li>The <code>printArea</code> parameter of the <code>addPage()</code>
method of the PrintJob class</li>
</ul>
<p>You can use the <code>new Rectangle()</code> constructor to create a
Rectangle object.</p>
<p><strong>Note:</strong> The Rectangle class does not define a rectangular Shape
display object. To draw a rectangular Shape object onscreen, use the
<code>drawRect()</code> method of the Graphics class.</p>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">Rectangle</span>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section tsd-is-external">
<h3>Constructors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#constructor" class="tsd-kind-icon">constructor</a></li>
</ul>
</section>
<section class="tsd-index-section tsd-is-external">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#bottom" class="tsd-kind-icon">bottom</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#bottomright" class="tsd-kind-icon">bottom<wbr>Right</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#height" class="tsd-kind-icon">height</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#left" class="tsd-kind-icon">left</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#right" class="tsd-kind-icon">right</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#size" class="tsd-kind-icon">size</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#top" class="tsd-kind-icon">top</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#topleft" class="tsd-kind-icon">top<wbr>Left</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#width" class="tsd-kind-icon">width</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#x" class="tsd-kind-icon">x</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#y" class="tsd-kind-icon">y</a></li>
</ul>
</section>
<section class="tsd-index-section tsd-is-external">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#clone" class="tsd-kind-icon">clone</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#contains" class="tsd-kind-icon">contains</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#containspoint" class="tsd-kind-icon">contains<wbr>Point</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#containsrect" class="tsd-kind-icon">contains<wbr>Rect</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#copyfrom" class="tsd-kind-icon">copy<wbr>From</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#equals" class="tsd-kind-icon">equals</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#inflate" class="tsd-kind-icon">inflate</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#inflatepoint" class="tsd-kind-icon">inflate<wbr>Point</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#intersection" class="tsd-kind-icon">intersection</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#intersects" class="tsd-kind-icon">intersects</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#isempty" class="tsd-kind-icon">is<wbr>Empty</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#offset" class="tsd-kind-icon">offset</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#offsetpoint" class="tsd-kind-icon">offset<wbr>Point</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#setempty" class="tsd-kind-icon">set<wbr>Empty</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#setto" class="tsd-kind-icon">set<wbr>To</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#tostring" class="tsd-kind-icon">to<wbr>String</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.rectangle.html#union" class="tsd-kind-icon">union</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-external">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-external">
<a name="constructor" class="tsd-anchor"></a>
<h3>constructor</h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">new <wbr>Rectangle<span class="tsd-signature-symbol">(</span>x<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, y<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, width<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, height<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L140">lib/openfl/geom/Rectangle.d.ts:140</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Creates a new Rectangle object with the top-left corner specified by the
<code>x</code> and <code>y</code> parameters and with the specified
<code>width</code> and <code>height</code> parameters. If you call this
function without parameters, a rectangle with <code>x</code>,
<code>y</code>, <code>width</code>, and <code>height</code> properties set
to 0 is created.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> x: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The <em>x</em> coordinate of the top-left corner of the
rectangle.</p>
</div>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> y: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The <em>y</em> coordinate of the top-left corner of the
rectangle.</p>
</div>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> width: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The width of the rectangle, in pixels.</p>
</div>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> height: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The height of the rectangle, in pixels.</p>
</div>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-external">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="bottom" class="tsd-anchor"></a>
<h3>bottom</h3>
<div class="tsd-signature tsd-kind-icon">bottom<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L57">lib/openfl/geom/Rectangle.d.ts:57</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The sum of the <code>y</code> and <code>height</code> properties.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="bottomright" class="tsd-anchor"></a>
<h3>bottom<wbr>Right</h3>
<div class="tsd-signature tsd-kind-icon">bottom<wbr>Right<span class="tsd-signature-symbol">:</span> <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L63">lib/openfl/geom/Rectangle.d.ts:63</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The location of the Rectangle object&#39;s bottom-right corner, determined by
the values of the <code>right</code> and <code>bottom</code> properties.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="height" class="tsd-anchor"></a>
<h3>height</h3>
<div class="tsd-signature tsd-kind-icon">height<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L70">lib/openfl/geom/Rectangle.d.ts:70</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The height of the rectangle, in pixels. Changing the <code>height</code>
value of a Rectangle object has no effect on the <code>x</code>,
<code>y</code>, and <code>width</code> properties.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="left" class="tsd-anchor"></a>
<h3>left</h3>
<div class="tsd-signature tsd-kind-icon">left<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L82">lib/openfl/geom/Rectangle.d.ts:82</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The <em>x</em> coordinate of the top-left corner of the rectangle. Changing
the <code>left</code> property of a Rectangle object has no effect on the
<code>y</code> and <code>height</code> properties. However it does affect
the <code>width</code> property, whereas changing the <code>x</code> value
does <em>not</em> affect the <code>width</code> property.</p>
</div>
<p>The value of the <code>left</code> property is equal to the value of
the <code>x</code> property.</p>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="right" class="tsd-anchor"></a>
<h3>right</h3>
<div class="tsd-signature tsd-kind-icon">right<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L87">lib/openfl/geom/Rectangle.d.ts:87</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The sum of the <code>x</code> and <code>width</code> properties.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="size" class="tsd-anchor"></a>
<h3>size</h3>
<div class="tsd-signature tsd-kind-icon">size<span class="tsd-signature-symbol">:</span> <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L93">lib/openfl/geom/Rectangle.d.ts:93</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The size of the Rectangle object, expressed as a Point object with the
values of the <code>width</code> and <code>height</code> properties.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="top" class="tsd-anchor"></a>
<h3>top</h3>
<div class="tsd-signature tsd-kind-icon">top<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L105">lib/openfl/geom/Rectangle.d.ts:105</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The <em>y</em> coordinate of the top-left corner of the rectangle. Changing
the <code>top</code> property of a Rectangle object has no effect on the
<code>x</code> and <code>width</code> properties. However it does affect
the <code>height</code> property, whereas changing the <code>y</code>
value does <em>not</em> affect the <code>height</code> property.</p>
</div>
<p>The value of the <code>top</code> property is equal to the value of the
<code>y</code> property.</p>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="topleft" class="tsd-anchor"></a>
<h3>top<wbr>Left</h3>
<div class="tsd-signature tsd-kind-icon">top<wbr>Left<span class="tsd-signature-symbol">:</span> <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L111">lib/openfl/geom/Rectangle.d.ts:111</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The location of the Rectangle object&#39;s top-left corner, determined by the
<em>x</em> and <em>y</em> coordinates of the point.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="width" class="tsd-anchor"></a>
<h3>width</h3>
<div class="tsd-signature tsd-kind-icon">width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L118">lib/openfl/geom/Rectangle.d.ts:118</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The width of the rectangle, in pixels. Changing the <code>width</code>
value of a Rectangle object has no effect on the <code>x</code>,
<code>y</code>, and <code>height</code> properties.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="x" class="tsd-anchor"></a>
<h3>x</h3>
<div class="tsd-signature tsd-kind-icon">x<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L129">lib/openfl/geom/Rectangle.d.ts:129</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The <em>x</em> coordinate of the top-left corner of the rectangle. Changing
the value of the <code>x</code> property of a Rectangle object has no
effect on the <code>y</code>, <code>width</code>, and <code>height</code>
properties.</p>
</div>
<p>The value of the <code>x</code> property is equal to the value of the
<code>left</code> property.</p>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="y" class="tsd-anchor"></a>
<h3>y</h3>
<div class="tsd-signature tsd-kind-icon">y<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L140">lib/openfl/geom/Rectangle.d.ts:140</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The <em>y</em> coordinate of the top-left corner of the rectangle. Changing
the value of the <code>y</code> property of a Rectangle object has no
effect on the <code>x</code>, <code>width</code>, and <code>height</code>
properties.</p>
</div>
<p>The value of the <code>y</code> property is equal to the value of the
<code>top</code> property.</p>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-external">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="clone" class="tsd-anchor"></a>
<h3>clone</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">clone<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L170">lib/openfl/geom/Rectangle.d.ts:170</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns a new Rectangle object with the same values for the
<code>x</code>, <code>y</code>, <code>width</code>, and
<code>height</code> properties as the original Rectangle object.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a></h4>
<p>A new Rectangle object with the same values for the
<code>x</code>, <code>y</code>, <code>width</code>, and
<code>height</code> properties as the original Rectangle object.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="contains" class="tsd-anchor"></a>
<h3>contains</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">contains<span class="tsd-signature-symbol">(</span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L182">lib/openfl/geom/Rectangle.d.ts:182</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Determines whether the specified point is contained within the rectangular
region defined by this Rectangle object.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>x: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>The <em>x</em> coordinate(horizontal position) of the point.</p>
</div>
</li>
<li>
<h5>y: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>The <em>y</em> coordinate(vertical position) of the point.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>A value of <code>true</code> if the Rectangle object contains the
specified point; otherwise <code>false</code>.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="containspoint" class="tsd-anchor"></a>
<h3>contains<wbr>Point</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">contains<wbr>Point<span class="tsd-signature-symbol">(</span>point<span class="tsd-signature-symbol">: </span><a href="openfl.geom.point.html" class="tsd-signature-type">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L196">lib/openfl/geom/Rectangle.d.ts:196</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Determines whether the specified point is contained within the rectangular
region defined by this Rectangle object. This method is similar to the
<code>Rectangle.contains()</code> method, except that it takes a Point
object as a parameter.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>point: <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></h5>
<div class="tsd-comment tsd-typography">
<p>The point, as represented by its <em>x</em> and <em>y</em>
coordinates.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>A value of <code>true</code> if the Rectangle object contains the
specified point; otherwise <code>false</code>.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="containsrect" class="tsd-anchor"></a>
<h3>contains<wbr>Rect</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">contains<wbr>Rect<span class="tsd-signature-symbol">(</span>rect<span class="tsd-signature-symbol">: </span><a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L210">lib/openfl/geom/Rectangle.d.ts:210</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Determines whether the Rectangle object specified by the <code>rect</code>
parameter is contained within this Rectangle object. A Rectangle object is
said to contain another if the second Rectangle object falls entirely
within the boundaries of the first.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>rect: <a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a></h5>
<div class="tsd-comment tsd-typography">
<p>The Rectangle object being checked.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>A value of <code>true</code> if the Rectangle object that you
specify is contained by this Rectangle object; otherwise
<code>false</code>.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="copyfrom" class="tsd-anchor"></a>
<h3>copy<wbr>From</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">copy<wbr>From<span class="tsd-signature-symbol">(</span>sourceRect<span class="tsd-signature-symbol">: </span><a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L213">lib/openfl/geom/Rectangle.d.ts:213</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>sourceRect: <a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="equals" class="tsd-anchor"></a>
<h3>equals</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">equals<span class="tsd-signature-symbol">(</span>toCompare<span class="tsd-signature-symbol">: </span><a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L229">lib/openfl/geom/Rectangle.d.ts:229</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Determines whether the object specified in the <code>toCompare</code>
parameter is equal to this Rectangle object. This method compares the
<code>x</code>, <code>y</code>, <code>width</code>, and
<code>height</code> properties of an object against the same properties of
this Rectangle object.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>toCompare: <a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a></h5>
<div class="tsd-comment tsd-typography">
<p>The rectangle to compare to this Rectangle object.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>A value of <code>true</code> if the object has exactly the same
values for the <code>x</code>, <code>y</code>, <code>width</code>,
and <code>height</code> properties as this Rectangle object;
otherwise <code>false</code>.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="inflate" class="tsd-anchor"></a>
<h3>inflate</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">inflate<span class="tsd-signature-symbol">(</span>dx<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, dy<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L245">lib/openfl/geom/Rectangle.d.ts:245</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Increases the size of the Rectangle object by the specified amounts, in
pixels. The center point of the Rectangle object stays the same, and its
size increases to the left and right by the <code>dx</code> value, and to
the top and the bottom by the <code>dy</code> value.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>dx: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>The value to be added to the left and the right of the Rectangle
object. The following equation is used to calculate the new
width and position of the rectangle:</p>
</div>
</li>
<li>
<h5>dy: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>The value to be added to the top and the bottom of the
Rectangle. The following equation is used to calculate the new
height and position of the rectangle:</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="inflatepoint" class="tsd-anchor"></a>
<h3>inflate<wbr>Point</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">inflate<wbr>Point<span class="tsd-signature-symbol">(</span>point<span class="tsd-signature-symbol">: </span><a href="openfl.geom.point.html" class="tsd-signature-type">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L260">lib/openfl/geom/Rectangle.d.ts:260</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Increases the size of the Rectangle object. This method is similar to the
<code>Rectangle.inflate()</code> method except it takes a Point object as
a parameter.</p>
</div>
<p>The following two code examples give the same result:</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>point: <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></h5>
<div class="tsd-comment tsd-typography">
<p>The <code>x</code> property of this Point object is used to
increase the horizontal dimension of the Rectangle object.
The <code>y</code> property is used to increase the vertical
dimension of the Rectangle object.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="intersection" class="tsd-anchor"></a>
<h3>intersection</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">intersection<span class="tsd-signature-symbol">(</span>toIntersect<span class="tsd-signature-symbol">: </span><a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L278">lib/openfl/geom/Rectangle.d.ts:278</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>If the Rectangle object specified in the <code>toIntersect</code>
parameter intersects with this Rectangle object, returns the area of
intersection as a Rectangle object. If the rectangles do not intersect,
this method returns an empty Rectangle object with its properties set to
0.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>toIntersect: <a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a></h5>
<div class="tsd-comment tsd-typography">
<p>The Rectangle object to compare against to see if it
intersects with this Rectangle object.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a></h4>
<p>A Rectangle object that equals the area of intersection. If the
rectangles do not intersect, this method returns an empty
Rectangle object; that is, a rectangle with its <code>x</code>,
<code>y</code>, <code>width</code>, and <code>height</code>
properties set to 0.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="intersects" class="tsd-anchor"></a>
<h3>intersects</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">intersects<span class="tsd-signature-symbol">(</span>toIntersect<span class="tsd-signature-symbol">: </span><a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L293">lib/openfl/geom/Rectangle.d.ts:293</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Determines whether the object specified in the <code>toIntersect</code>
parameter intersects with this Rectangle object. This method checks the
<code>x</code>, <code>y</code>, <code>width</code>, and
<code>height</code> properties of the specified Rectangle object to see if
it intersects with this Rectangle object.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>toIntersect: <a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a></h5>
<div class="tsd-comment tsd-typography">
<p>The Rectangle object to compare against this Rectangle
object.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>A value of <code>true</code> if the specified object intersects
with this Rectangle object; otherwise <code>false</code>.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="isempty" class="tsd-anchor"></a>
<h3>is<wbr>Empty</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">is<wbr>Empty<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L302">lib/openfl/geom/Rectangle.d.ts:302</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Determines whether or not this Rectangle object is empty.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>A value of <code>true</code> if the Rectangle object&#39;s width or
height is less than or equal to 0; otherwise <code>false</code>.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="offset" class="tsd-anchor"></a>
<h3>offset</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">offset<span class="tsd-signature-symbol">(</span>dx<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, dy<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L312">lib/openfl/geom/Rectangle.d.ts:312</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Adjusts the location of the Rectangle object, as determined by its
top-left corner, by the specified amounts.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>dx: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>Moves the <em>x</em> value of the Rectangle object by this amount.</p>
</div>
</li>
<li>
<h5>dy: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>Moves the <em>y</em> value of the Rectangle object by this amount.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="offsetpoint" class="tsd-anchor"></a>
<h3>offset<wbr>Point</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">offset<wbr>Point<span class="tsd-signature-symbol">(</span>point<span class="tsd-signature-symbol">: </span><a href="openfl.geom.point.html" class="tsd-signature-type">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L322">lib/openfl/geom/Rectangle.d.ts:322</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Adjusts the location of the Rectangle object using a Point object as a
parameter. This method is similar to the <code>Rectangle.offset()</code>
method, except that it takes a Point object as a parameter.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>point: <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></h5>
<div class="tsd-comment tsd-typography">
<p>A Point object to use to offset this Rectangle object.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="setempty" class="tsd-anchor"></a>
<h3>set<wbr>Empty</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">set<wbr>Empty<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L333">lib/openfl/geom/Rectangle.d.ts:333</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Sets all of the Rectangle object&#39;s properties to 0. A Rectangle object is
empty if its width or height is less than or equal to 0.</p>
</div>
<p> This method sets the values of the <code>x</code>, <code>y</code>,
<code>width</code>, and <code>height</code> properties to 0.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="setto" class="tsd-anchor"></a>
<h3>set<wbr>To</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">set<wbr>To<span class="tsd-signature-symbol">(</span>xa<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, ya<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, widtha<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, heighta<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L336">lib/openfl/geom/Rectangle.d.ts:336</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>xa: <span class="tsd-signature-type">number</span></h5>
</li>
<li>
<h5>ya: <span class="tsd-signature-type">number</span></h5>
</li>
<li>
<h5>widtha: <span class="tsd-signature-type">number</span></h5>
</li>
<li>
<h5>heighta: <span class="tsd-signature-type">number</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="tostring" class="tsd-anchor"></a>
<h3>to<wbr>String</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">to<wbr>String<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L339">lib/openfl/geom/Rectangle.d.ts:339</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="union" class="tsd-anchor"></a>
<h3>union</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">union<span class="tsd-signature-symbol">(</span>toUnion<span class="tsd-signature-symbol">: </span><a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Rectangle.d.ts#L353">lib/openfl/geom/Rectangle.d.ts:353</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Adds two rectangles together to create a new Rectangle object, by filling
in the horizontal and vertical space between the two rectangles.</p>
</div>
<p><strong>Note:</strong> The <code>union()</code> method ignores rectangles with
<code>0</code> as the height or width value, such as: <code>var
rect2:Rectangle = new Rectangle(300,300,50,0);</code></p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>toUnion: <a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a></h5>
<div class="tsd-comment tsd-typography">
<p>A Rectangle object to add to this Rectangle object.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="openfl.geom.rectangle.html" class="tsd-signature-type">Rectangle</a></h4>
<p>A new Rectangle object that is the union of the two rectangles.</p>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="label tsd-is-external">
<span>Externals</span>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.desktop.html">openfl.desktop</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.display.html">openfl.display</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.display3d.html">openfl.display3D</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.errors.html">openfl.errors</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.events.html">openfl.events</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.external.html">openfl.external</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.filters.html">openfl.filters</a>
</li>
<li class="current tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.geom.html">openfl.geom</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.media.html">openfl.media</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.net.html">openfl.net</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.profiler.html">openfl.profiler</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.sensors.html">openfl.sensors</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.system.html">openfl.system</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.text.html">openfl.text</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.ui.html">openfl.ui</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.utils.html">openfl.utils</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-enum tsd-parent-kind-module tsd-is-external">
<a href="../enums/openfl.geom.orientation3d.html" class="tsd-kind-icon">Orientation3D</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.colortransform.html" class="tsd-kind-icon">Color<wbr>Transform</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.matrix.html" class="tsd-kind-icon">Matrix</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.matrix3d.html" class="tsd-kind-icon">Matrix3D</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.perspectiveprojection.html" class="tsd-kind-icon">Perspective<wbr>Projection</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.point.html" class="tsd-kind-icon">Point</a>
</li>
</ul>
<ul class="current">
<li class="current tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.rectangle.html" class="tsd-kind-icon">Rectangle</a>
<ul>
<li class=" tsd-kind-constructor tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#constructor" class="tsd-kind-icon">constructor</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#bottom" class="tsd-kind-icon">bottom</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#bottomright" class="tsd-kind-icon">bottom<wbr>Right</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#height" class="tsd-kind-icon">height</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#left" class="tsd-kind-icon">left</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#right" class="tsd-kind-icon">right</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#size" class="tsd-kind-icon">size</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#top" class="tsd-kind-icon">top</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#topleft" class="tsd-kind-icon">top<wbr>Left</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#width" class="tsd-kind-icon">width</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#x" class="tsd-kind-icon">x</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#y" class="tsd-kind-icon">y</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#clone" class="tsd-kind-icon">clone</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#contains" class="tsd-kind-icon">contains</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#containspoint" class="tsd-kind-icon">contains<wbr>Point</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#containsrect" class="tsd-kind-icon">contains<wbr>Rect</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#copyfrom" class="tsd-kind-icon">copy<wbr>From</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#equals" class="tsd-kind-icon">equals</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#inflate" class="tsd-kind-icon">inflate</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#inflatepoint" class="tsd-kind-icon">inflate<wbr>Point</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#intersection" class="tsd-kind-icon">intersection</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#intersects" class="tsd-kind-icon">intersects</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#isempty" class="tsd-kind-icon">is<wbr>Empty</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#offset" class="tsd-kind-icon">offset</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#offsetpoint" class="tsd-kind-icon">offset<wbr>Point</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#setempty" class="tsd-kind-icon">set<wbr>Empty</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#setto" class="tsd-kind-icon">set<wbr>To</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#tostring" class="tsd-kind-icon">to<wbr>String</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.rectangle.html#union" class="tsd-kind-icon">union</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.transform.html" class="tsd-kind-icon">Transform</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.utils3d.html" class="tsd-kind-icon">Utils3D</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.vector3d.html" class="tsd-kind-icon">Vector3D</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li>
<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
<li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li>
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
<li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li>
<li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
<li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
<li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="http://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script>
</body>
</html>