source: trunk/MagicSoft/Cosy/gui/MGImage.h@ 8824

Last change on this file since 8824 was 4076, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 1.2 KB
Line 
1#ifndef MGIMAGE_H
2#define MGIMAGE_H
3
4//
5// This File contains the declaration of the MGImage-class
6//
7// Author: Thomas Bretz
8// Version: V1.0 (1-8-2000)
9
10#ifndef ROOT_TGFrame
11#include <TGFrame.h>
12#endif
13#ifndef ROOT_TGX11
14#include <TGX11.h>
15#endif
16
17class TMutex;
18
19typedef unsigned char byte;
20
21class MGImage : public TGFrame
22{
23 XImage *fImage;
24
25 GContext_t fDefGC;
26 //Pixmap_t fPixmap;
27
28 UInt_t fWidth;
29 UInt_t fHeight;
30
31 TMutex *fMuxPixmap; //! test
32
33 enum
34 {
35 kNeedRedraw = BIT(17),
36 kSyncMode = BIT(18)
37 };
38
39 void DrawImg16(unsigned short *d, char *s, char *e);
40 void DrawImg24(char *d, char *s, char *e);
41 void DrawColImg16(unsigned short *d, char *s1, char *s2, char *e);
42 void DrawColImg24(char *d, char *s1, char *s2, char *e);
43
44public:
45 MGImage(const TGWindow* p, UInt_t w, UInt_t h, UInt_t options = kSunkenFrame, ULong_t back = fgDefaultFrameBackground);
46 ~MGImage();
47
48 void DoRedraw();
49
50 void DrawImg(const byte *buffer);
51 void DrawColImg(const byte *gbuf, const byte *cbuf);
52
53 void EnableSyncMode() { SetBit(kSyncMode); }
54 void DisableSyncMode() { ResetBit(kSyncMode); }
55
56 ClassDef(MGImage, 0)
57};
58
59#endif // MGIMAGE_H
Note: See TracBrowser for help on using the repository browser.