summaryrefslogtreecommitdiff
path: root/vcl/source/pdf/PDFiumLibrary.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/pdf/PDFiumLibrary.cxx')
-rw-r--r--vcl/source/pdf/PDFiumLibrary.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx
index 074863156f97..c5d27316944f 100644
--- a/vcl/source/pdf/PDFiumLibrary.cxx
+++ b/vcl/source/pdf/PDFiumLibrary.cxx
@@ -465,6 +465,28 @@ basegfx::B2DRectangle PDFiumAnnotation::getRectangle()
return aB2DRectangle;
}
+Color PDFiumAnnotation::getColor()
+{
+ Color aColor = COL_TRANSPARENT;
+ unsigned int nR, nG, nB, nA;
+ if (FPDFAnnot_GetColor(mpAnnotation, FPDFANNOT_COLORTYPE_Color, &nR, &nG, &nB, &nA))
+ {
+ aColor = Color(0xFF - nA, nR, nG, nB);
+ }
+ return aColor;
+}
+
+Color PDFiumAnnotation::getInteriorColor()
+{
+ Color aColor = COL_TRANSPARENT;
+ unsigned int nR, nG, nB, nA;
+ if (FPDFAnnot_GetColor(mpAnnotation, FPDFANNOT_COLORTYPE_InteriorColor, &nR, &nG, &nB, &nA))
+ {
+ aColor = Color(0xFF - nA, nR, nG, nB);
+ }
+ return aColor;
+}
+
bool PDFiumAnnotation::hasKey(OString const& rKey)
{
return FPDFAnnot_HasKey(mpAnnotation, rKey.getStr());