1 #ifndef RT_AnnotationBaseDefines_H_ 2 #define RT_AnnotationBaseDefines_H_ 46 tagColor(
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a)
47 :
color(((
r | ((unsigned long)
g << 8)) | (((unsigned long)
b) << 16)) | (((unsigned long)
a) << 24)) {}
48 unsigned char r()
const {
return color & 0xFF; }
49 unsigned char g()
const {
return (
color >> 8) & 0xFF; }
50 unsigned char b()
const {
return (
color >> 16) & 0xFF; }
51 unsigned char a()
const {
return (
color >> 24) & 0xFF; }
52 unsigned long rgb()
const {
return color & 0xFFFFFF; }
53 unsigned long argb()
const {
return ((
b() | ((
unsigned long)
g() << 8)) | (((
unsigned long)
r()) << 16)) | (((
unsigned long)
a()) << 24); }
54 void setR(
unsigned char r) {
color = (
color & 0xFFFFFF00) | ((
unsigned long)
r & 0xFF); }
55 void setG(
unsigned char g) {
color = (
color & 0xFFFF00FF) | (((
unsigned long)
g & 0xFF) << 8); }
56 void setB(
unsigned char b) {
color = (
color & 0xFF00FFFF) | (((
unsigned long)
b & 0xFF) << 16); }
57 void setA(
unsigned char a) {
color = (
color & 0x00FFFFFF) | (((
unsigned long)
a & 0xFF) << 24); }
62 #endif //RT_AnnotationBaseDefines_H_ tagColor()
Definition: annotationbasedefines.h:44
int top
Definition: annotationbasedefines.h:26
void set(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
Definition: annotationbasedefines.h:58
tagPoint(int x, int y)
Definition: annotationbasedefines.h:16
int bottom
Definition: annotationbasedefines.h:28
int width() const
Definition: annotationbasedefines.h:32
unsigned long rgb() const
Definition: annotationbasedefines.h:52
void setA(unsigned char a)
Definition: annotationbasedefines.h:57
void setB(unsigned char b)
Definition: annotationbasedefines.h:56
unsigned char a() const
Definition: annotationbasedefines.h:51
Definition: annotationbasedefines.h:12
bool pointIn(int x, int y) const
Definition: annotationbasedefines.h:35
int x
Definition: annotationbasedefines.h:13
区域对象信息结构.
Definition: annotationbasedefines.h:24
int y
Definition: annotationbasedefines.h:14
struct rtcimp::tagColor Color
tagColor(unsigned long val)
Definition: annotationbasedefines.h:45
std::list< Point > PointArray
Definition: annotationbasedefines.h:19
Definition: annotationbasedefines.h:42
void moveY(int y)
Definition: annotationbasedefines.h:36
int right
Definition: annotationbasedefines.h:27
tagColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
Definition: annotationbasedefines.h:46
tagRect()
Definition: annotationbasedefines.h:29
bool pointIn(const Point &p) const
Definition: annotationbasedefines.h:34
tagPoint()
Definition: annotationbasedefines.h:15
bool isRectEmpty() const
Definition: annotationbasedefines.h:31
Definition: annotationbasedefines.h:8
struct rtcimp::tagRect Rect
区域对象信息结构.
unsigned long color
Definition: annotationbasedefines.h:43
unsigned char g() const
Definition: annotationbasedefines.h:49
void moveX(int x)
Definition: annotationbasedefines.h:37
unsigned char b() const
Definition: annotationbasedefines.h:50
void moveXY(int x, int y)
Definition: annotationbasedefines.h:38
unsigned long argb() const
Definition: annotationbasedefines.h:53
bool operator !=(const tagRect &other) const
Definition: annotationbasedefines.h:40
struct rtcimp::tagPoint Point
void setR(unsigned char r)
Definition: annotationbasedefines.h:54
tagRect(int left, int top, int right, int bottom)
Definition: annotationbasedefines.h:30
unsigned char r() const
Definition: annotationbasedefines.h:48
int left
Definition: annotationbasedefines.h:25
int height() const
Definition: annotationbasedefines.h:33
void setG(unsigned char g)
Definition: annotationbasedefines.h:55
bool operator==(const tagRect &other) const
Definition: annotationbasedefines.h:39