Home | History | Annotate | Download | only in cpp

Lines Matching full:rect

19 class Rect {
22 /// The default constructor. Creates a <code>Rect</code> in the upper-left
24 Rect() {
32 /// converting the <code>PP_Rect</code> to a <code>Rect</code>. This is an
35 /// @param[in] rect A <code>PP_Rect</code>.
36 Rect(const PP_Rect& rect) { // Implicit.
37 set_x(rect.point.x);
38 set_y(rect.point.y);
39 set_width(rect.size.width);
40 set_height(rect.size.height);
44 /// converting them to a <code>Rect</code> in the upper-left starting
49 Rect(int32_t w, int32_t h) {
64 Rect(int32_t x, int32_t y, int32_t w, int32_t h) {
72 /// <code>Size</code> to a <code>Rect</code> in the upper-left starting
76 explicit Rect(const Size& s) {
90 Rect(const Point& origin, const Size& size) {
96 ~Rect() {
99 /// PP_Rect() allows implicit conversion of a <code>Rect</code> to a
152 /// @return The value of width for this <code>Rect</code>.
170 /// @return The value of height for this <code>Rect</code>.
221 /// <code>for (int32_t x = rect.x(); x < rect.right(); ++x) {}</code>
232 /// <code>for (int32_t y = rect.y(); y < rect.bottom(); ++y) {}</code>
239 /// Setter function for setting the value of the <code>Rect</code>.
252 /// Setter function for setting the value of the <code>Rect</code>.
254 /// @param[in] rect A pointer to a <code>PP_Rect</code>.
255 void SetRect(const PP_Rect& rect) {
256 rect_ = rect;
329 /// @param[in] rect A pointer to a <code>Rect</code>.
332 bool Contains(const Rect& rect) const;
337 /// @param[in] rect A pointer to a <code>Rect</code>.
340 bool Intersects(const Rect& rect) const;
345 /// @param[in] rect A pointer to a <code>Rect</code>.
347 /// @return A <code>Rect</code> representing the intersection.
348 Rect Intersect(const Rect& rect) const;
353 /// @param[in] rect A pointer to a <code>Rect</code>.
355 /// @return A <code>Rect</code> representing the union.
356 Rect Union(const Rect& rect) const;
359 /// <code>rect</code> from this Rect. If <code>rect</code>does not intersect
361 /// returned. If <code>rect</code> contains <code>this</code>, then an empty
362 /// <code>Rect</code> is returned.
364 /// @param[in] rect A pointer to a <code>Rect</code>.
366 /// @return A <code>Rect</code> representing the subtraction.
367 Rect Subtract(const Rect& rect) const;
375 /// @param[in] rect A pointer to a <code>Rect</code>.
377 /// @return A <code>Rect</code> representing the difference between this
379 Rect AdjustToFit(const Rect& rect) const;
390 /// @param[in] rect A pointer to a <code>Rect</code>.
393 bool SharesEdgeWith(const Rect& rect) const;
404 /// @param[in] lhs The <code>Rect</code> on the left-hand side of the equation.
405 /// @param[in] rhs The <code>Rect</code> on the right-hand side of the equation.
408 inline bool operator==(const pp::Rect& lhs, const pp::Rect& rhs) {
417 /// @param[in] lhs The <code>Rect</code> on the left-hand side of the equation.
418 /// @param[in] rhs The <code>Rect</code> on the right-hand side of the
422 inline bool operator!=(const pp::Rect& lhs, const pp::Rect& rhs) {