From 491112b06c802de0d7dc577e77690d1a081f05c9 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 30 May 2018 13:30:10 +0000 Subject: Add FPDFPath_GetDrawMode() API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was already possible to set the draw mode of a path object, this is the other direction. Change-Id: Id0ee98dd8dfe433edd0e4715fc009ad4d1625981 Reviewed-on: https://pdfium-review.googlesource.com/33010 Reviewed-by: dsinclair Reviewed-by: Nicolás Peña Moreno Commit-Queue: dsinclair --- fpdfsdk/fpdf_edit_embeddertest.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fpdfsdk/fpdf_edit_embeddertest.cpp') diff --git a/fpdfsdk/fpdf_edit_embeddertest.cpp b/fpdfsdk/fpdf_edit_embeddertest.cpp index 458ae0022a..f9b165c28d 100644 --- a/fpdfsdk/fpdf_edit_embeddertest.cpp +++ b/fpdfsdk/fpdf_edit_embeddertest.cpp @@ -241,6 +241,13 @@ TEST_F(FPDFEditEmbeddertest, AddPaths) { // Fill rectangle with red and insert to the page EXPECT_TRUE(FPDFPath_SetFillColor(red_rect, 255, 0, 0, 255)); EXPECT_TRUE(FPDFPath_SetDrawMode(red_rect, FPDF_FILLMODE_ALTERNATE, 0)); + + int fillmode = FPDF_FILLMODE_NONE; + FPDF_BOOL stroke = true; + EXPECT_TRUE(FPDFPath_GetDrawMode(red_rect, &fillmode, &stroke)); + EXPECT_EQ(FPDF_FILLMODE_ALTERNATE, fillmode); + EXPECT_FALSE(stroke); + FPDFPage_InsertObject(page, red_rect); { ScopedFPDFBitmap page_bitmap = RenderPageWithFlags(page, nullptr, 0); -- cgit v1.2.3