// GrCard.h: interface for the CGrCard class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_GRCARD_H__2ED2079B_8224_472A_BACA_0A4A2B0874DE__INCLUDED_) #define AFX_GRCARD_H__2ED2079B_8224_472A_BACA_0A4A2B0874DE__INCLUDED_ #include "MyBitmap.h" // Added by ClassView #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "Card.h" class CActionHandler; class CGrCard { public: void invalidate(); void faceDown(bool bFaceDown); void setBoundsAndAngle(int left, int top, int angleRange, bool invalidateWindow=false); bool report(CActionHandler *controller); bool hitTest(CPoint point); bool is(Card card); void draw(CDC *pDC); CGrCard(Card card, CMyBitmap *bmpBack, CWnd *pView, bool faceDown=true); virtual ~CGrCard(); bool operator<(const CGrCard& y) const; private: void prepareRotatedImages(double dAngle, int &dstX, int &dstY); void drawSprite(CDC *pDC, CBitmap *pSprite); CWnd *m_pView; CBitmap *m_pRotatedBack; CBitmap *m_pRotatedBitmapMask; CBitmap *m_pRotatedBitmap; CMyBitmap *m_pBmpBack; bool m_faceDown; CRect m_boundingRect; CMyBitmap m_bitmap; int m_face; Suite m_suite; }; bool lessThan(const CGrCard *elem1, const CGrCard *elem2); #endif // !defined(AFX_GRCARD_H__2ED2079B_8224_472A_BACA_0A4A2B0874DE__INCLUDED_)