Page principale | Hiérarchie des classes | Liste par ordre alphabétique | Liste des composants | Liste des fichiers | Composants | Déclarations | Pages associées

MyScreen.h

Aller à la documentation de ce fichier.
00001 #if !defined(AFX_BUFFERING_H__83257F59_D206_411F_AB95_D99685ECCD2D__INCLUDED_)
00002 #define AFX_BUFFERING_H__83257F59_D206_411F_AB95_D99685ECCD2D__INCLUDED_
00003 
00004 #if _MSC_VER > 1000
00005 #pragma once
00006 #endif // _MSC_VER > 1000
00007 
00008 #include <windows.h>
00009 #include <wingdi.h>
00010 
00011 /* *************************************************************************************
00012         Structure qui fonctionne correctement mais n'acelere pas les acces par
00013         rapport a GetRValue(color) par ex
00014 ************************************************************************************* */
00015 /*
00016 typedef union {
00017         struct  
00018         {
00019                 UCHAR red;
00020                 UCHAR green;
00021                 UCHAR blue;
00022                 UCHAR unused;
00023         } rgb;
00024         COLORREF color;
00025 } MyColor;
00026 */
00027 
00028 // ***************************************************************************************
00029 
00030 class CMyScreen
00031 {
00032         public:
00033                 CMyScreen();
00034                 virtual ~CMyScreen();
00035 
00036                 int                     GetPixelIndex(int x, int y);
00037 
00038                 COLORREF        GetPixel(int x,int y);
00039                 COLORREF        GetPixel(int index);
00040 
00041                 void            SetPixel(int x, int y,UCHAR red,UCHAR green,UCHAR blue);
00042                 void            SetPixel(int x, int y,COLORREF color);
00043 
00044                 void            SetPixel(int index,COLORREF color); 
00045                 void            SetPixel(int index,UCHAR red,UCHAR green,UCHAR blue);
00046 
00047 
00048                 long            GetHeigth() { return m_heigth+1; }
00049                 long            GetWidth()      {return m_width; }
00050 
00051                 BOOL            CopyToBuffer    (HWND hWndTemp=NULL);
00052                 BOOL            CopyToBuffer    (HDC hDC,int dx,int dy);
00053                 BOOL            CopyToBuffer_Slow (HDC hDC,int dx,int dy); // sans acceleration
00054 
00055                 BOOL            CopyToScreen();
00056 
00057         private:
00058                 void            PreCompute();
00059 
00060                 UCHAR *m_buffer;
00061                 long m_heigth;
00062                 long m_width;
00063                 long m_sum;
00064 };
00065 
00066 #endif // !defined(AFX_BUFFERING_H__83257F59_D206_411F_AB95_D99685ECCD2D__INCLUDED_)

Généré le Thu Apr 8 18:58:43 2004 pour SFC par doxygen 1.3.6