summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_strokedata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_strokedata.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_strokedata.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/xfa/fxfa/parser/cxfa_strokedata.cpp b/xfa/fxfa/parser/cxfa_strokedata.cpp
index 1f8a56ea12..0579eef621 100644
--- a/xfa/fxfa/parser/cxfa_strokedata.cpp
+++ b/xfa/fxfa/parser/cxfa_strokedata.cpp
@@ -11,18 +11,18 @@
#include "xfa/fxfa/parser/xfa_utils.h"
int32_t CXFA_StrokeData::GetPresence() const {
- return m_pNode ? m_pNode->JSNode()->GetEnum(XFA_ATTRIBUTE_Presence)
+ return m_pNode ? m_pNode->JSNode()->GetEnum(XFA_Attribute::Presence)
: XFA_ATTRIBUTEENUM_Invisible;
}
int32_t CXFA_StrokeData::GetCapType() const {
if (!m_pNode)
return XFA_ATTRIBUTEENUM_Square;
- return m_pNode->JSNode()->GetEnum(XFA_ATTRIBUTE_Cap);
+ return m_pNode->JSNode()->GetEnum(XFA_Attribute::Cap);
}
int32_t CXFA_StrokeData::GetStrokeType() const {
- return m_pNode ? m_pNode->JSNode()->GetEnum(XFA_ATTRIBUTE_Stroke)
+ return m_pNode ? m_pNode->JSNode()->GetEnum(XFA_Attribute::Stroke)
: XFA_ATTRIBUTEENUM_Solid;
}
@@ -31,17 +31,17 @@ float CXFA_StrokeData::GetThickness() const {
}
CXFA_Measurement CXFA_StrokeData::GetMSThickness() const {
- return m_pNode ? m_pNode->JSNode()->GetMeasure(XFA_ATTRIBUTE_Thickness)
- : XFA_GetAttributeDefaultValue_Measure(XFA_Element::Edge,
- XFA_ATTRIBUTE_Thickness,
- XFA_XDPPACKET_Form);
+ return m_pNode ? m_pNode->JSNode()->GetMeasure(XFA_Attribute::Thickness)
+ : XFA_GetAttributeDefaultValue_Measure(
+ XFA_Element::Edge, XFA_Attribute::Thickness,
+ XFA_XDPPACKET_Form);
}
void CXFA_StrokeData::SetMSThickness(CXFA_Measurement msThinkness) {
if (!m_pNode)
return;
- m_pNode->JSNode()->SetMeasure(XFA_ATTRIBUTE_Thickness, msThinkness, false);
+ m_pNode->JSNode()->SetMeasure(XFA_Attribute::Thickness, msThinkness, false);
}
FX_ARGB CXFA_StrokeData::GetColor() const {
@@ -53,7 +53,7 @@ FX_ARGB CXFA_StrokeData::GetColor() const {
return 0xFF000000;
WideStringView wsColor;
- pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Value, wsColor, true);
+ pNode->JSNode()->TryCData(XFA_Attribute::Value, wsColor, true);
return CXFA_Data::ToColor(wsColor);
}
@@ -70,22 +70,22 @@ void CXFA_StrokeData::SetColor(FX_ARGB argb) {
int b;
std::tie(a, r, g, b) = ArgbDecode(argb);
wsColor.Format(L"%d,%d,%d", r, g, b);
- pNode->JSNode()->SetCData(XFA_ATTRIBUTE_Value, wsColor, false, false);
+ pNode->JSNode()->SetCData(XFA_Attribute::Value, wsColor, false, false);
}
int32_t CXFA_StrokeData::GetJoinType() const {
- return m_pNode ? m_pNode->JSNode()->GetEnum(XFA_ATTRIBUTE_Join)
+ return m_pNode ? m_pNode->JSNode()->GetEnum(XFA_Attribute::Join)
: XFA_ATTRIBUTEENUM_Square;
}
bool CXFA_StrokeData::IsInverted() const {
- return m_pNode ? m_pNode->JSNode()->GetBoolean(XFA_ATTRIBUTE_Inverted)
+ return m_pNode ? m_pNode->JSNode()->GetBoolean(XFA_Attribute::Inverted)
: false;
}
float CXFA_StrokeData::GetRadius() const {
return m_pNode ? m_pNode->JSNode()
- ->GetMeasure(XFA_ATTRIBUTE_Radius)
+ ->GetMeasure(XFA_Attribute::Radius)
.ToUnit(XFA_UNIT_Pt)
: 0;
}