blob: b4bebdbb8de567bbc80e09c19b6475f29e9fd3cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
// Copyright (C) 1999-2017
// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
// For conditions of distribution and use, see copyright notice in "copyright"
#ifndef __truecolor16_h__
#define __truecolor16_h__
#include <string.h>
#include <iostream>
#include <sstream>
#include <iomanip>
using namespace std;
#include <tk.h>
class TrueColor16 {
protected:
unsigned long rx_;
unsigned long gx_;
unsigned long bx_;
unsigned short rm_;
unsigned short gm_;
unsigned short bm_;
int rs_;
int gs_;
int bs_;
private:
unsigned short decodeMask(unsigned short, int*);
protected:
void decodeTrueColor(char*, XColor*, XImage*);
void encodeTrueColor(XColor*, char*, XImage*);
void encodeTrueColor(unsigned char*, XImage*);
public:
TrueColor16(Visual*);
};
#endif
|