|
// BuffCanvas.h: interface for the CBuffCanvas class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_BUFFCANVAS_H__0CF53F0D_ED8A_428F_AB32_F97F21AE56BA__INCLUDED_)
#define AFX_BUFFCANVAS_H__0CF53F0D_ED8A_428F_AB32_F97F21AE56BA__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// includes
#include <math.h>
class CBuffCanvas
{
public:
// methods
CBuffCanvas(CWnd* pWnd, CRect bounds, COLORREF bkColor, bool isTransparent);
virtual ~CBuffCanvas();
void Draw(CDC* screen);
CDC* GetDC();
void Rotate(int degrees);
void Rotate(int degrees, CPoint origin);
protected:
bool m_bShowBackground;
COLORREF m_colorTransparent;
CBitmap* PrepareMask(CDC* pDC, CBitmap* bitMask);
// attributes
CBitmap m_bmOffScreen;
CDC* m_pDC;
CPaintDC* m_pCanvas;
CRect m_bounds;
CWnd* m_pWnd;
// methods
int Round(double num);
};
#endif // !defined(AFX_BUFFCANVAS_H__0CF53F0D_ED8A_428F_AB32_F97F21AE56BA__INCLUDED_)
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
I am currently working for the U.S. Peace Corps in the Kingdom of Tonga. I teach C++ at the Tongan Insitute of Higher Education. In my spare time, I go kayaking and snorkeling. Tonga is a very out of the way, non-tourist island in the South Pacific. If you need to just get away, I highly recommend you come here.
As for programming, I am currently working on MFC applications. I am always interested in more work if you like what I've done. Enjoy!
Kevin