1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-10-06 12:01:39 +00:00
pdf2htmlEX/src/util/misc.h

38 lines
796 B
C
Raw Normal View History

2012-08-10 13:30:41 +00:00
/*
2012-11-29 09:45:26 +00:00
* Help classes and Functions
2012-08-10 13:30:41 +00:00
*
* by WangLu
* 2012.08.10
*/
#ifndef UTIL_H__
#define UTIL_H__
2012-08-27 10:37:00 +00:00
#include <iostream>
2012-08-14 13:23:33 +00:00
2012-11-29 10:28:07 +00:00
#include <GfxState.h>
2012-09-10 05:03:25 +00:00
namespace pdf2htmlEX {
2012-09-06 16:58:23 +00:00
static inline long long hash_ref(const Ref * id)
{
return (((long long)(id->num)) << (sizeof(id->gen)*8)) | (id->gen);
}
2012-10-01 17:59:04 +00:00
/*
* In PDF, edges of the rectangle are in the middle of the borders
* In HTML, edges are completely outside the rectangle
*/
void css_fix_rectangle_border_width(double x1, double y1, double x2, double y2,
double border_width,
double & x, double & y, double & w, double & h,
double & border_top_bottom_width,
double & border_left_right_width);
2012-10-01 20:06:38 +00:00
std::ostream & operator << (std::ostream & out, const GfxRGB & rgb);
2012-11-29 09:45:26 +00:00
} // namespace pdf2htmlEX
2012-08-10 13:30:41 +00:00
#endif //UTIL_H__