diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp | 6 | ||||
-rw-r--r-- | core/fxge/ge/cfx_graphstate.cpp | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp index fe65e5916c..6643035b09 100644 --- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp +++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp @@ -215,6 +215,12 @@ void CPDF_PageContentGenerator::ProcessGraphics(CFX_ByteTextBuf* buf, float lineWidth = pPageObj->m_GraphState.GetLineWidth(); if (lineWidth != 1.0f) *buf << lineWidth << " w "; + CFX_GraphStateData::LineCap lineCap = pPageObj->m_GraphState.GetLineCap(); + if (lineCap != CFX_GraphStateData::LineCapButt) + *buf << static_cast<int>(lineCap) << " J "; + CFX_GraphStateData::LineJoin lineJoin = pPageObj->m_GraphState.GetLineJoin(); + if (lineJoin != CFX_GraphStateData::LineJoinMiter) + *buf << static_cast<int>(lineJoin) << " j "; GraphicsData graphD; graphD.fillAlpha = pPageObj->m_GeneralState.GetFillAlpha(); diff --git a/core/fxge/ge/cfx_graphstate.cpp b/core/fxge/ge/cfx_graphstate.cpp index 54443b9636..ad6b5fc6c7 100644 --- a/core/fxge/ge/cfx_graphstate.cpp +++ b/core/fxge/ge/cfx_graphstate.cpp @@ -36,14 +36,16 @@ void CFX_GraphState::SetLineWidth(float width) { } CFX_GraphStateData::LineCap CFX_GraphState::GetLineCap() const { - return m_Ref.GetObject()->m_LineCap; + return m_Ref.GetObject() ? m_Ref.GetObject()->m_LineCap + : CFX_GraphStateData::LineCapButt; } void CFX_GraphState::SetLineCap(CFX_GraphStateData::LineCap cap) { m_Ref.GetPrivateCopy()->m_LineCap = cap; } CFX_GraphStateData::LineJoin CFX_GraphState::GetLineJoin() const { - return m_Ref.GetObject()->m_LineJoin; + return m_Ref.GetObject() ? m_Ref.GetObject()->m_LineJoin + : CFX_GraphStateData::LineJoinMiter; } void CFX_GraphState::SetLineJoin(CFX_GraphStateData::LineJoin join) { |