1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 04:50:09 +00:00

check compiler flag

This commit is contained in:
Lu Wang 2012-10-12 22:39:58 +08:00
parent 52fb22f430
commit b58df8cc16
4 changed files with 26 additions and 2 deletions

View File

@ -131,6 +131,13 @@ else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
endif()
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("${CMAKE_CXX_FLAGS}" CXX0X_SUPPORT)
if(NOT CXX0X_SUPPORT)
message(FATAL_ERROR "Error: you compiler does not support C++0x, please update it.")
endif()
configure_file (${CMAKE_SOURCE_DIR}/src/include/pdf2htmlEX-config.h.in ${CMAKE_SOURCE_DIR}/src/include/pdf2htmlEX-config.h)
configure_file (${CMAKE_SOURCE_DIR}/pdf2htmlEX.1.in ${CMAKE_SOURCE_DIR}/pdf2htmlEX.1)

View File

@ -271,7 +271,16 @@ void HTMLRenderer::check_state_change(GfxState * state)
if(all_changed || color_changed)
{
GfxRGB new_color;
state->getFillRGB(&new_color);
/*
* Render modes 0 2 4 6 fill text (stroke or not)
* Render modes 1 5 stroke only
* Render modes 3 7 hidden (but ok, we won't even draw text)
*/
if(state->getRender() % 2 == 0)
state->getFillRGB(&new_color);
else
state->getStrokeRGB(&new_color);
if(!((new_color.r == cur_color.r) && (new_color.g == cur_color.g) && (new_color.b == cur_color.b)))
{
new_line_state = max<NewLineState>(new_line_state, NLS_SPAN);

View File

@ -517,6 +517,14 @@ void HTMLRenderer::drawString(GfxState * state, GooString * s)
char *p = s->getCString();
int len = s->getLength();
//debug
{
if(strcmp(p, "ORTUG") == 0)
{
cerr << "DEBUG: " << (int)(state->getRender()) << endl;
}
}
double dx = 0;
double dy = 0;
double dxerr = 0;

View File

@ -309,7 +309,7 @@ class HTMLRenderer : public OutputDev
double cur_word_space;
bool word_space_changed;
// color
// text color
long long cur_color_id;
GfxRGB cur_color;
bool color_changed;