diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-10-05 11:14:12 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-10-05 17:22:58 +0000 |
commit | 921fe6bfde3b4cf3da4b55fab77103af3a65cab4 (patch) | |
tree | 2587bf5ab7c8d72a085137c9986235c0c1514b2c /fpdfsdk/fpdfformfill.cpp | |
parent | 023d645733cddcf026897c51f3d4c34090eb4b2d (diff) | |
download | pdfium-921fe6bfde3b4cf3da4b55fab77103af3a65cab4.tar.xz |
Move CPDF_RenderOptions members to private
This CL moves the members of CPDF_RenderOptions to be private members
and adds accessor methods as needed.
Change-Id: Ie91665ff53ae00cc4c53741d089d375503fabe11
Reviewed-on: https://pdfium-review.googlesource.com/15531
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfformfill.cpp')
-rw-r--r-- | fpdfsdk/fpdfformfill.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/fpdfsdk/fpdfformfill.cpp b/fpdfsdk/fpdfformfill.cpp index 3d821b601f..e789df461e 100644 --- a/fpdfsdk/fpdfformfill.cpp +++ b/fpdfsdk/fpdfformfill.cpp @@ -120,25 +120,27 @@ void FFLCommon(FPDF_FORMHANDLE hHandle, pDevice->SetClip_Rect(clip); CPDF_RenderOptions options; + uint32_t option_flags = options.GetFlags(); if (flags & FPDF_LCD_TEXT) - options.m_Flags |= RENDER_CLEARTYPE; + option_flags |= RENDER_CLEARTYPE; else - options.m_Flags &= ~RENDER_CLEARTYPE; + option_flags &= ~RENDER_CLEARTYPE; + options.SetFlags(option_flags); // Grayscale output if (flags & FPDF_GRAYSCALE) - options.m_ColorMode = CPDF_RenderOptions::kGray; + options.SetColorMode(CPDF_RenderOptions::kGray); - options.m_bDrawAnnots = flags & FPDF_ANNOT; + options.SetDrawAnnots(flags & FPDF_ANNOT); #ifdef PDF_ENABLE_XFA - options.m_pOCContext = - pdfium::MakeRetain<CPDF_OCContext>(pPDFDoc, CPDF_OCContext::View); + options.SetOCContext( + pdfium::MakeRetain<CPDF_OCContext>(pPDFDoc, CPDF_OCContext::View)); if (CPDFSDK_PageView* pPageView = pFormFillEnv->GetPageView(pPage, true)) pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, clip); #else // PDF_ENABLE_XFA - options.m_pOCContext = pdfium::MakeRetain<CPDF_OCContext>( - pPage->m_pDocument.Get(), CPDF_OCContext::View); + options.SetOCContext(pdfium::MakeRetain<CPDF_OCContext>( + pPage->m_pDocument.Get(), CPDF_OCContext::View)); if (CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, pPage)) pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options); #endif // PDF_ENABLE_XFA |