-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathHeeksColor.h
More file actions
24 lines (19 loc) · 758 Bytes
/
HeeksColor.h
File metadata and controls
24 lines (19 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// HeeksColor.h
// Copyright (c) 2009, Dan Heeks
// This program is released under the BSD license. See the file COPYING for details.
#pragma once
typedef int Aci_t; // AutoCAD color index
class HeeksColor{
public:
unsigned char red;
unsigned char green;
unsigned char blue;
HeeksColor(void){red = 0; green = 0; blue = 0;}
HeeksColor(unsigned char a, unsigned char b, unsigned char c);
HeeksColor(long color);
HeeksColor(Aci_t aci);
long COLORREF_color(void)const;
bool operator==(const HeeksColor &b)const{if(red == b.red && green == b.green && blue == b.blue)return true;else return false;}
HeeksColor best_black_or_white(void)const;
bool operator!= ( const HeeksColor & rhs ) const { return(! (*this == rhs)); }
};