diff options
Diffstat (limited to 'xfa/fxfa/parser/cxfa_stipple.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_stipple.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/xfa/fxfa/parser/cxfa_stipple.cpp b/xfa/fxfa/parser/cxfa_stipple.cpp index 17b64fa80b..24715171b8 100644 --- a/xfa/fxfa/parser/cxfa_stipple.cpp +++ b/xfa/fxfa/parser/cxfa_stipple.cpp @@ -8,6 +8,7 @@ #include "fxjs/xfa/cjx_stipple.h" #include "third_party/base/ptr_util.h" +#include "xfa/fxfa/parser/cxfa_color.h" namespace { @@ -37,3 +38,13 @@ CXFA_Stipple::CXFA_Stipple(CXFA_Document* doc, XFA_PacketType packet) pdfium::MakeUnique<CJX_Stipple>(this)) {} CXFA_Stipple::~CXFA_Stipple() {} + +CXFA_Color* CXFA_Stipple::GetColorIfExists() { + return GetChild<CXFA_Color>(0, XFA_Element::Color, false); +} + +int32_t CXFA_Stipple::GetRate() { + return JSObject() + ->TryInteger(XFA_Attribute::Rate, true) + .value_or(GetDefaultRate()); +} |