summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfeditpath.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 /fpdfsdk/fpdfeditpath.cpp
parente818bcba7e036d7e1dc8f282a88022b814dbfb40 (diff)
downloadpdfium-2eb1a705c243b2d5ab912268dd453f5ade075b6f.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 'fpdfsdk/fpdfeditpath.cpp')
-rw-r--r--fpdfsdk/fpdfeditpath.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/fpdfsdk/fpdfeditpath.cpp b/fpdfsdk/fpdfeditpath.cpp
index 1d3673c2ae..f6e103c047 100644
--- a/fpdfsdk/fpdfeditpath.cpp
+++ b/fpdfsdk/fpdfeditpath.cpp
@@ -41,6 +41,15 @@ DLLEXPORT FPDF_BOOL FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path,
return true;
}
+DLLEXPORT FPDF_BOOL FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path, float width) {
+ if (!path || width < 0.0f)
+ return false;
+
+ auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ pPathObj->m_GraphState.SetLineWidth(width);
+ return true;
+}
+
DLLEXPORT FPDF_BOOL FPDFPath_SetFillColor(FPDF_PAGEOBJECT path,
unsigned int R,
unsigned int G,