summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-02-09 18:17:33 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-10 04:08:27 +0000
commit2eb1a705c243b2d5ab912268dd453f5ade075b6f (patch)
tree7cbf6aabde7ecf3e1327535a9f6066856fc6626b /core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
parente818bcba7e036d7e1dc8f282a88022b814dbfb40 (diff)
downloadpdfium-chromium/3011.tar.xz
Add line width option for stroking pathschromium/3011chromium/3010chromium/3009
BUG=pdfium:661 Change-Id: Ie1dc82a1323a35ebbd63a5b7b8f8c95f9a5325fe Reviewed-on: https://pdfium-review.googlesource.com/2613 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp')
-rw-r--r--core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
index a5bd741cc0..9de97ee718 100644
--- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
+++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
@@ -192,6 +192,7 @@ void CPDF_PageContentGenerator::ProcessPath(CFX_ByteTextBuf* buf,
// values cannot be obtained. The method also adds an external graphics
// dictionary, as described in Section 4.3.4.
// "rg" sets the fill color, "RG" sets the stroke color (using DefaultRGB)
+// "w" sets the stroke line width.
// "ca" sets the fill alpha, "CA" sets the stroke alpha.
// "q" saves the graphics state, so that the settings can later be reversed
void CPDF_PageContentGenerator::ProcessGraphics(CFX_ByteTextBuf* buf,
@@ -207,6 +208,9 @@ void CPDF_PageContentGenerator::ProcessGraphics(CFX_ByteTextBuf* buf,
*buf << strokeColor[0] << " " << strokeColor[1] << " " << strokeColor[2]
<< " RG ";
}
+ FX_FLOAT lineWidth = pPageObj->m_GraphState.GetLineWidth();
+ if (lineWidth != 1.0f)
+ *buf << lineWidth << " w ";
GraphicsData graphD;
graphD.fillAlpha = pPageObj->m_GeneralState.GetFillAlpha();