mozilla

Compare Revisions

Rect

Change Revisions

Revision 94491:

Revision 94491 by Sheppy on

Revision 94492:

Revision 94492 by Sheppy on

Title:
Rect
Rect
Slug:
JavaScript_code_modules/Geometry.jsm/Rect
JavaScript_code_modules/Geometry.jsm/Rect
Tags:
NeedsExample, Modules, Geometry
NeedsExample, Modules, Geometry
Content:

Revision 94491
Revision 94492
n20            Number height();n20            <code>Rect blend(Rect otherRect, Number scaler);<br><
 >/code>
n25            Number width();n25            <code>Point center();<br></code>
n30            Number x();<code><br></code>n30            <code>Rect clone();<br></code>
t35            Number y();t35            <code>boolean contains(Rect otherRect);<br></code>
36          </td>
37        </tr>
38        <tr>
39          <td>
40            <code>Rect copyFrom(Rect otherRect);<br></code>
41          </td>
42        </tr>
43        <tr>
44          <td>
45            <code>boolean equals(Rect otherRect);<br></code>
46          </td>
47        </tr>
48        <tr>
49          <td>
50            <code>Rect expandToContain(Rect otherRect);</code>
51          </td>
52        </tr>
53        <tr>
54          <td>
55            <code>Rect expandToIntegers();<br></code>
56          </td>
57        </tr>
58        <tr>
59          <td>
60            <code>Rect inflate(xScale, yScale);<br></code>
61          </td>
62        </tr>
63        <tr>
64          <td>
65            <code>Rect intersect(Rect otherRect);</code>
66          </td>
67        </tr>
68        <tr>
69          <td>
70            <code>boolean intersects(Rect otherRect);</code>
71          </td>
72        </tr>
73        <tr>
74          <td>
75            <code>boolean isEmpty();<br></code>
76          </td>
77        </tr>
78        <tr>
79          <td>
80            <code>Rect map(mapFunction);<br></code>
81          </td>
82        </tr>
83        <tr>
84          <td>
85            <code>Rect restrictTo(Rect otherRect);</code>
86          </td>
87        </tr>
88        <tr>
89          <td>
90            <code>Rect scale(xScale, yScale);<br></code>
91          </td>
92        </tr>
93        <tr>
94          <td>
95            <code>Rect setBounds(left, top, right, bottom);<br></
 >code>
96          </td>
97        </tr>
98        <tr>
99          <td>
100            <code>Rect setRect(x, y, width, height);<br></code>
101          </td>
102        </tr>
103        <tr>
104          <td>
105            <code>Rect setRect(Rect);<br></code>
106          </td>
107        </tr>
108        <tr>
109          <td>
110            <code>Rect[] subtract(Rect otherRect);<br></code>
111          </td>
112        </tr>
113        <tr>
114          <td>
115            <code>String toString();<br></code>
116          </td>
117        </tr>
118        <tr>
119          <td>
120            <code>Rect translate(x, y);<br></code>
121          </td>
122        </tr>
123        <tr>
124          <td>
125            <code>Rect translateInside(Rect otherRect);<br></code
 >>
126          </td>
127        </tr>
128        <tr>
129          <td>
130            <code>Rect union(Rect otherRect);<br></code>
131          </td>
132        </tr>
133      </tbody>
134    </table>
135    <h2>
136      Attributes
137    </h2>
138    <table class="standard-table" style="width: auto;">
139      <tbody>
140        <tr>
141          <td class="header">
142            Attribute
143          </td>
144          <td class="header">
145            Type
146          </td>
147          <td class="header">
148            Description
149          </td>
150        </tr>
151        <tr>
152          <td>
153            <code>height<br></code>
154          </td>
155          <td>
156            <code>Number<br></code>
157          </td>
158          <td>
159            The rectangle's width.
160          </td>
161        </tr>
162        <tr>
163          <td>
164            <code>width<br></code>
165          </td>
166          <td>
167            <code>Number<br></code>
168          </td>
169          <td>
170            The rectangle's height.
171          </td>
172        </tr>
173        <tr>
174          <td>
175            <code>x</code>
176          </td>
177          <td>
178            <code>Number</code>
179          </td>
180          <td>
181            The X&nbsp;coordinate of the top-left corner of the r
 >ectangle.
182          </td>
183        </tr>
184        <tr>
185          <td>
186            <code>y</code>
187          </td>
188          <td>
189            <code>Number</code>
190          </td>
191          <td>
192            The Y coordinate of the top-left corner of the rectan
 >gle.

Back to History