From 22a237fb403d76d65a254c4f9cf1c1a9d0b22772 Mon Sep 17 00:00:00 2001 From: wileyrya Date: Fri, 26 May 2017 09:26:27 -0500 Subject: Add public API for setting LineJoin and LineCap on a path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BUG=pdfium:718 R=npm@chromium.org Change-Id: Icdc1546c87a676a7d05330dece2c5eacd92c0c92 Reviewed-on: https://pdfium-review.googlesource.com/5951 Reviewed-by: Nicolás Peña Commit-Queue: Nicolás Peña --- core/fxge/ge/cfx_graphstate.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/fxge') 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) { -- cgit v1.2.3