7#include "xfa/fxfa/parser/cxfa_stroke.h"
13#include "fxjs/xfa/cjx_object.h"
14#include "xfa/fgas/graphics/cfgas_gegraphics.h"
15#include "xfa/fxfa/cxfa_ffwidget.h"
16#include "xfa/fxfa/parser/cxfa_color.h"
17#include "xfa/fxfa/parser/cxfa_document.h"
18#include "xfa/fxfa/parser/cxfa_measurement.h"
19#include "xfa/fxfa/parser/cxfa_node.h"
20#include "xfa/fxfa/parser/xfa_utils.h"
25 switch (iStrokeType) {
27 float dashArray[] = {4, 1, 2, 1};
36 float dashArray[] = {4, 1, 2, 1, 2, 1};
46 float dashArray[] = {5, 1};
54 float dashArray[] = {2, 1};
110 JSObject()->SetMeasure(
XFA_Attribute::Thickness, msThinkness,
false);
114 const auto* pNode = GetChild<CXFA_Color>(0,
XFA_Element::Color,
false);
119 pNode->JSObject()->GetCData(
XFA_Attribute::Value).AsStringView()
);
124 JSObject()->GetOrCreateProperty<CXFA_Color>(0,
XFA_Element::Color);
132 std::tie(a, r, g, b) = ArgbDecode(argb);
174 const CFGAS_GEPath& pPath,
180 if (fThickness < 0.001f)
CFGAS_GEColor(const FX_ARGB argb)
StateRestorer(CFGAS_GEGraphics *graphics)
void SetLineDash(float dashPhase, pdfium::span< const float > dashArray)
void SetLineWidth(float lineWidth)
void SetStrokeColor(const CFGAS_GEColor &color)
void SetLineCap(CFX_GraphStateData::LineCap lineCap)
void StrokePath(const CFGAS_GEPath &path, const CFX_Matrix &matrix)
static FX_ARGB StringToFXARGB(WideStringView view)
CXFA_Measurement(float fValue, XFA_Unit eUnit)
float ToUnit(XFA_Unit eUnit) const
XFA_AttributeValue GetJoinType()
CXFA_Stroke(CXFA_Document *pDoc, XFA_PacketType ePacket, Mask< XFA_XDPPACKET > validPackets, XFA_ObjectType oType, XFA_Element eType, pdfium::span< const PropertyData > properties, pdfium::span< const AttributeData > attributes, CJX_Object *js_node)
XFA_AttributeValue GetCapType()
void Stroke(CFGAS_GEGraphics *pGS, const CFGAS_GEPath &pPath, const CFX_Matrix &matrix)
bool SameStyles(CXFA_Stroke *stroke, Mask< SameStyleOption > dwFlags)
void SetMSThickness(CXFA_Measurement msThinkness)
CXFA_Measurement GetMSThickness() const
void SetColor(FX_ARGB argb)
float GetThickness() const
XFA_AttributeValue GetStrokeType()
static WideString Format(const wchar_t *pFormat,...)
void XFA_StrokeTypeSetLineDash(CFGAS_GEGraphics *pGraphics, XFA_AttributeValue iStrokeType, XFA_AttributeValue iCapType)