Changeset 352 for trunk/src/ddraw/rectangle.h
- Timestamp:
- Jul 21, 1999, 12:16:51 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ddraw/rectangle.h
r312 r352 34 34 height() const; 35 35 36 /*--------------------------------- Synonyms ---------------------------------37 38 Coord39 bottom ( ) const,40 left ( ) const,41 right ( ) const,42 top ( ) const;43 */44 45 36 private: 46 37 long lTop,lLeft; … … 48 39 }; // class DDRectangle 49 40 50 DDRectangle :: DDRectangle ( Coord y1,51 Coord x1,52 Coord y2,53 Coord x2 )54 {55 lTop = y1;56 lLeft = x1;57 lBottom = y2;58 lRight = x2;59 }60 61 IBase::Boolean DDRectangle :: operator == ( const DDRectangle &aRect ) const62 {63 return ( lTop == aRect.lTop && lLeft == aRect.lLeft64 &&65 lBottom == aRect.lBottom && lRight == aRect.lRight);66 }67 IBase::Boolean DDRectangle :: operator != ( const DDRectangle& aRect ) const68 {69 return !( *this == aRect );70 }71 IBase::Boolean DDRectangle :: intersects ( const DDRectangle &aRect ) const72 {73 return ( lTop < aRect.lBottom && lLeft<aRect.lRight74 &&75 aRect.lTop < lBottom && aRect.lLeft < lRight );76 }77 78 DDRectangle::Coord DDRectangle :: width ( ) const79 {80 return ( lRight - lLeft);81 }82 83 DDRectangle::Coord DDRectangle :: height ( ) const84 {85 return ( lBottom - lTop);86 }87 88 41 #endif
Note:
See TracChangeset
for help on using the changeset viewer.