summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-01-13 21:30:24 +0100
committerMiklos Vajna <vmiklos@collabora.com>2021-01-14 09:10:34 +0100
commit06322b0922972fec4b9e5f57e8dbab18ca9bd676 (patch)
treecb479b66d62d7ed5e0f13d52a44a71f76b3e16ae /svx/source
parentde80c787dba8436ec403126dbec88a6d202a1ad4 (diff)
pdfium: add an FPDFPageObj_GetStrokeWidth() wrapper
Change-Id: If411b788b3ea07c29377e01052ee6a48893ca482 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109250 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/svdraw/svdpdf.cxx13
1 files changed, 3 insertions, 10 deletions
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 00969a90904c..e266609bd295 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -1007,8 +1007,7 @@ void ImpSdrPdfImport::ImportPath(std::unique_ptr<vcl::pdf::PDFiumPageObject> con
basegfx::utils::createScaleTranslateB2DHomMatrix(mfScaleX, mfScaleY, maOfs.X(), maOfs.Y()));
aPolyPoly.transform(aTransform);
- float fWidth = 1;
- FPDFPageObj_GetStrokeWidth(pPageObject->getPointer(), &fWidth);
+ float fWidth = pPageObject->getStrokeWidth();
const double dWidth = 0.5 * fabs(sqrt2(aPathMatrix.a(), aPathMatrix.c()) * fWidth);
mnLineWidth = convertPointToMm100(dWidth);
@@ -1024,17 +1023,11 @@ void ImpSdrPdfImport::ImportPath(std::unique_ptr<vcl::pdf::PDFiumPageObject> con
mpVD->SetDrawMode(DrawModeFlags::NoFill);
}
- unsigned int nR;
- unsigned int nG;
- unsigned int nB;
- unsigned int nA;
- FPDFPageObj_GetFillColor(pPageObject->getPointer(), &nR, &nG, &nB, &nA);
- mpVD->SetFillColor(Color(nR, nG, nB));
+ mpVD->SetFillColor(pPageObject->getFillColor());
if (bStroke)
{
- FPDFPageObj_GetStrokeColor(pPageObject->getPointer(), &nR, &nG, &nB, &nA);
- mpVD->SetLineColor(Color(nR, nG, nB));
+ mpVD->SetLineColor(pPageObject->getStrokeColor());
}
else
mpVD->SetLineColor(COL_TRANSPARENT);