From 603a31d0c509c7ce3c2709dcb5377a78e6ce4815 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Wed, 14 Jun 2017 11:41:18 -0400 Subject: Add blend to GraphicsData MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CL [1] added the ability to set the blend mode for a page object. This CL adds the corresponding component to GraphicsData since the blend mode is part of ExtGSState. In addition, a test using the SetBlendMode method is added. [1] https://pdfium-review.googlesource.com/c/5953/ Bug: pdfium:720 Change-Id: I49120284345185c200a45cc3b37ec59f0658e2dc Reviewed-on: https://pdfium-review.googlesource.com/6510 Commit-Queue: Nicolás Peña Reviewed-by: dsinclair --- core/fpdfapi/page/cpdf_page.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/fpdfapi/page/cpdf_page.cpp') diff --git a/core/fpdfapi/page/cpdf_page.cpp b/core/fpdfapi/page/cpdf_page.cpp index 092a1cad41..075aa9023d 100644 --- a/core/fpdfapi/page/cpdf_page.cpp +++ b/core/fpdfapi/page/cpdf_page.cpp @@ -183,7 +183,9 @@ int CPDF_Page::GetPageRotation() const { bool GraphicsData::operator<(const GraphicsData& other) const { if (fillAlpha != other.fillAlpha) return fillAlpha < other.fillAlpha; - return strokeAlpha < other.strokeAlpha; + if (strokeAlpha != other.strokeAlpha) + return strokeAlpha < other.strokeAlpha; + return blendType < other.blendType; } bool FontData::operator<(const FontData& other) const { -- cgit v1.2.3