7#include "xfa/fxfa/parser/cxfa_stroke.h"
13#include "fxjs/xfa/cjx_object.h"
14#include "xfa/fgas/graphics/cfgas_gecolor.h"
15#include "xfa/fgas/graphics/cfgas_gegraphics.h"
16#include "xfa/fxfa/cxfa_ffwidget.h"
17#include "xfa/fxfa/parser/cxfa_color.h"
18#include "xfa/fxfa/parser/cxfa_document.h"
19#include "xfa/fxfa/parser/cxfa_measurement.h"
20#include "xfa/fxfa/parser/cxfa_node.h"
21#include "xfa/fxfa/parser/xfa_utils.h"
26 switch (iStrokeType) {
28 float dashArray[] = {4, 1, 2, 1};
33 pGraphics->SetLineDash(0, dashArray);
37 float dashArray[] = {4, 1, 2, 1, 2, 1};
43 pGraphics->SetLineDash(0, dashArray);
47 float dashArray[] = {5, 1};
51 pGraphics->SetLineDash(0, dashArray);
55 float dashArray[] = {2, 1};
59 pGraphics->SetLineDash(0, dashArray);
73 pdfium::span<
const PropertyData> properties,
74 pdfium::span<
const AttributeData> attributes,
111 JSObject()->SetMeasure(
XFA_Attribute::Thickness, msThinkness,
false);
115 const auto* pNode = GetChild<CXFA_Color>(0,
XFA_Element::Color,
false);
120 pNode->JSObject()->GetCData(
XFA_Attribute::Value).AsStringView()
);
125 JSObject()->GetOrCreateProperty<CXFA_Color>(0,
XFA_Element::Color);
129 pNode->JSObject()->SetCData(
171 const CFGAS_GEPath& pPath,
177 if (fThickness < 0.001f)
static ByteString ColorToString(FX_ARGB argb)
CFGAS_GEColor(FX_ARGB argb)
StateRestorer(CFGAS_GEGraphics *graphics)
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 FromASCII(ByteStringView str)
void XFA_StrokeTypeSetLineDash(CFGAS_GEGraphics *pGraphics, XFA_AttributeValue iStrokeType, XFA_AttributeValue iCapType)
fxcrt::WideString WideString