Ignore:
Timestamp:
Jul 21, 1999, 12:16:51 AM (26 years ago)
Author:
hugh
Message:

Changhed from Isequence to DPA for managing rectangles and surfaces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ddraw/rectangle.h

    r312 r352  
    3434  height() const;
    3535
    36 /*--------------------------------- Synonyms ---------------------------------
    37 
    38 Coord
    39   bottom ( ) const,
    40   left   ( ) const,
    41   right  ( ) const,
    42   top    ( ) const;
    43 */
    44 
    4536private:
    4637  long lTop,lLeft;
     
    4839}; // class DDRectangle
    4940
    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 ) const
    62   {
    63   return ( lTop == aRect.lTop && lLeft == aRect.lLeft
    64            &&
    65            lBottom == aRect.lBottom && lRight == aRect.lRight);
    66   }
    67 IBase::Boolean DDRectangle :: operator != ( const DDRectangle& aRect ) const
    68   {
    69   return !( *this == aRect );
    70   }
    71 IBase::Boolean DDRectangle :: intersects ( const DDRectangle &aRect ) const
    72 {
    73   return ( lTop < aRect.lBottom && lLeft<aRect.lRight
    74            &&
    75            aRect.lTop < lBottom && aRect.lLeft < lRight );
    76 }
    77 
    78 DDRectangle::Coord DDRectangle :: width (  ) const
    79 {
    80   return ( lRight - lLeft);
    81 }
    82 
    83 DDRectangle::Coord DDRectangle :: height (  ) const
    84 {
    85   return ( lBottom - lTop);
    86 }
    87 
    8841#endif
Note: See TracChangeset for help on using the changeset viewer.