summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_editpage.cpp
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-05-22 14:27:29 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-22 14:27:29 +0000
commit366df7fd6e6b75e0500e67960a20dc3129c703d6 (patch)
treef68cb87b681dddbe5c4b98b7cd46d834af3d4018 /fpdfsdk/fpdf_editpage.cpp
parent11bb17875604a51f442f8c906555c146a5571d2d (diff)
downloadpdfium-366df7fd6e6b75e0500e67960a20dc3129c703d6.tar.xz
Add FPDFPageObj_GetStrokeWidth() API
It was already possible to set the stroke width of a page object, this is the other direction. Change-Id: I5c4681b232768fc928bc7a169f223877284d4812 Reviewed-on: https://pdfium-review.googlesource.com/32770 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_editpage.cpp')
-rw-r--r--fpdfsdk/fpdf_editpage.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp
index 1a9198b291..ea4659f54a 100644
--- a/fpdfsdk/fpdf_editpage.cpp
+++ b/fpdfsdk/fpdf_editpage.cpp
@@ -592,6 +592,16 @@ FPDFPageObj_SetStrokeWidth(FPDF_PAGEOBJECT page_object, float width) {
}
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFPageObj_GetStrokeWidth(FPDF_PAGEOBJECT page_object, float* width) {
+ auto* pPageObj = CPDFPageObjectFromFPDFPageObject(page_object);
+ if (!pPageObj || !width)
+ return false;
+
+ *width = pPageObj->m_GraphState.GetLineWidth();
+ return true;
+}
+
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
FPDFPageObj_SetLineJoin(FPDF_PAGEOBJECT page_object, int line_join) {
if (!page_object)
return false;