summaryrefslogtreecommitdiff
path: root/poppler/CairoOutputDev.cc
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2022-03-19 15:06:58 +1030
committerAlbert Astals Cid <tsdgeos@yahoo.es>2022-04-04 11:34:24 +0000
commit61f6d6d1492b9a8bfa19dfe4bfa4a7294a9a29bd (patch)
tree39898fedf06d258404ebaa256686a553394a9375 /poppler/CairoOutputDev.cc
parent5e57fc6025fdf9374cf77549265a2ccb9c91fbf8 (diff)
Cairo color type 3 fonts
Fixes #729 Fixes #944
Diffstat (limited to 'poppler/CairoOutputDev.cc')
-rw-r--r--poppler/CairoOutputDev.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index f6a005f6..d51ae4e6 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -156,6 +156,7 @@ CairoOutputDev::CairoOutputDev()
inUncoloredPattern = false;
inType3Char = false;
t3_glyph_has_bbox = false;
+ has_color = false;
text_matrix_valid = true;
groupColorSpaceStack = nullptr;
@@ -545,6 +546,7 @@ void CairoOutputDev::updateFillColor(GfxState *state)
LOG(printf("fill color: %d %d %d\n", fill_color.r, fill_color.g, fill_color.b));
}
+ has_color = true;
}
void CairoOutputDev::updateStrokeColor(GfxState *state)
@@ -562,6 +564,7 @@ void CairoOutputDev::updateStrokeColor(GfxState *state)
LOG(printf("stroke color: %d %d %d\n", stroke_color.r, stroke_color.g, stroke_color.b));
}
+ has_color = true;
}
void CairoOutputDev::updateFillOpacity(GfxState *state)
@@ -613,6 +616,7 @@ void CairoOutputDev::updateFillColorStop(GfxState *state, double offset)
auto opacity = (state->getStrokePattern()) ? state->getStrokeOpacity() : state->getFillOpacity();
cairo_pattern_add_color_stop_rgba(fill_pattern, offset, colToDbl(fill_color.r), colToDbl(fill_color.g), colToDbl(fill_color.b), opacity);
+ has_color = true;
LOG(printf("fill color stop: %f (%d, %d, %d, %d)\n", offset, fill_color.r, fill_color.g, fill_color.b, dblToCol(opacity)));
}
@@ -2845,6 +2849,7 @@ void CairoOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *s
cairo_pattern_destroy(maskPattern);
cairo_pattern_destroy(pattern);
+ has_color = true;
cleanup:
imgStr->close();
@@ -3499,6 +3504,7 @@ void CairoImageOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, i
setCairo(nullptr);
cairo_surface_destroy(surface);
cairo_destroy(cr);
+ has_color = true;
}
}
@@ -3556,5 +3562,6 @@ void CairoImageOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *
setCairo(nullptr);
cairo_surface_destroy(surface);
cairo_destroy(cr);
+ has_color = true;
}
}