mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
add missing files
This commit is contained in:
parent
a641bee616
commit
19b1852d62
17
src/util/color.cc
Normal file
17
src/util/color.cc
Normal file
@ -0,0 +1,17 @@
|
||||
#include "util/color.h"
|
||||
#include "util/misc.h"
|
||||
|
||||
namespace pdf2htmlEX {
|
||||
|
||||
using std::ostream;
|
||||
|
||||
ostream & operator << (ostream & out, const Color & color)
|
||||
{
|
||||
if(color.transparent)
|
||||
out << "transparent";
|
||||
else
|
||||
out << color.rgb;
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace pdf2htmlEX
|
32
src/util/color.h
Normal file
32
src/util/color.h
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Header file for Color
|
||||
* Copyright (C) 2013 Lu Wang <coolwanglu@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef COLOR_H__
|
||||
#define COLOR_H__
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include <GfxState.h>
|
||||
|
||||
namespace pdf2htmlEX {
|
||||
|
||||
struct Color
|
||||
{
|
||||
bool transparent;
|
||||
GfxRGB rgb;
|
||||
bool operator == (const Color & c) const {
|
||||
if(transparent != c.transparent)
|
||||
return false;
|
||||
if(transparent)
|
||||
return true;
|
||||
return ((rgb.r == c.rgb.r) && (rgb.g == c.rgb.g) && (rgb.b == c.rgb.b));
|
||||
}
|
||||
};
|
||||
|
||||
std::ostream & operator << (std::ostream & out, const Color & color);
|
||||
|
||||
} // namespace pdf2htmlEX
|
||||
|
||||
#endif // COLOR_H__
|
Loading…
Reference in New Issue
Block a user