blob: 4f01aa1194694ec441519676b4431b3fbc27d3ce (
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 __truecolor8_h__
#define __truecolor8_h__
#include <string.h>
#include <iostream>
#include <sstream>
#include <iomanip>
using namespace std;
#include <tk.h>
class TrueColor8 {
protected:
unsigned long rx_;
unsigned long gx_;
unsigned long bx_;
unsigned char rm_;
unsigned char gm_;
unsigned char bm_;
int rs_;
int gs_;
int bs_;
private:
unsigned char decodeMask(unsigned char, int*);
protected:
void decodeTrueColor(char*, XColor*, XImage*);
void encodeTrueColor(XColor*, char*, XImage*);
void encodeTrueColor(unsigned char*, XImage*);
public:
TrueColor8(Visual*);
};
#endif
|