summaryrefslogtreecommitdiff
path: root/testing/embedder_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'testing/embedder_test.cpp')
-rw-r--r--testing/embedder_test.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp
index 6cea598400..f818091cb7 100644
--- a/testing/embedder_test.cpp
+++ b/testing/embedder_test.cpp
@@ -255,13 +255,17 @@ FPDF_PAGE EmbedderTest::LoadPage(int page_number) {
}
FPDF_BITMAP EmbedderTest::RenderPage(FPDF_PAGE page) {
+ return RenderPageWithFlags(page, 0);
+}
+
+FPDF_BITMAP EmbedderTest::RenderPageWithFlags(FPDF_PAGE page, int flags) {
int width = static_cast<int>(FPDF_GetPageWidth(page));
int height = static_cast<int>(FPDF_GetPageHeight(page));
int alpha = FPDFPage_HasTransparency(page) ? 1 : 0;
FPDF_BITMAP bitmap = FPDFBitmap_Create(width, height, alpha);
FPDF_DWORD fill_color = alpha ? 0x00000000 : 0xFFFFFFFF;
FPDFBitmap_FillRect(bitmap, 0, 0, width, height, fill_color);
- FPDF_RenderPageBitmap(bitmap, page, 0, 0, width, height, 0, 0);
+ FPDF_RenderPageBitmap(bitmap, page, 0, 0, width, height, 0, flags);
FPDF_FFLDraw(form_handle_, bitmap, page, 0, 0, width, height, 0, 0);
return bitmap;
}