Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: core/fpdfapi/fpdf_page/fpdf_page_parser.cpp

Issue 2303553002: Make CPDF_GeneralState have a CPDF_GeneralStateData (Closed)
Patch Set: Move functions .cpp file Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/fpdfapi/fpdf_page/pageint.h" 7 #include "core/fpdfapi/fpdf_page/pageint.h"
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 return; 866 return;
867 } 867 }
868 if (m_PathStartX != m_PathCurrentX || m_PathStartY != m_PathCurrentY) { 868 if (m_PathStartX != m_PathCurrentX || m_PathStartY != m_PathCurrentY) {
869 AddPathPoint(m_PathStartX, m_PathStartY, FXPT_LINETO | FXPT_CLOSEFIGURE); 869 AddPathPoint(m_PathStartX, m_PathStartY, FXPT_LINETO | FXPT_CLOSEFIGURE);
870 } else if (m_pPathPoints[m_PathPointCount - 1].m_Flag != FXPT_MOVETO) { 870 } else if (m_pPathPoints[m_PathPointCount - 1].m_Flag != FXPT_MOVETO) {
871 m_pPathPoints[m_PathPointCount - 1].m_Flag |= FXPT_CLOSEFIGURE; 871 m_pPathPoints[m_PathPointCount - 1].m_Flag |= FXPT_CLOSEFIGURE;
872 } 872 }
873 } 873 }
874 874
875 void CPDF_StreamContentParser::Handle_SetFlat() { 875 void CPDF_StreamContentParser::Handle_SetFlat() {
876 m_pCurStates->m_GeneralState.GetPrivateCopy()->m_Flatness = GetNumber(0); 876 m_pCurStates->m_GeneralState.SetFlatness(GetNumber(0));
877 } 877 }
878 878
879 void CPDF_StreamContentParser::Handle_BeginImageData() {} 879 void CPDF_StreamContentParser::Handle_BeginImageData() {}
880 880
881 void CPDF_StreamContentParser::Handle_SetLineJoin() { 881 void CPDF_StreamContentParser::Handle_SetLineJoin() {
882 m_pCurStates->m_GraphState.SetLineJoin( 882 m_pCurStates->m_GraphState.SetLineJoin(
883 static_cast<CFX_GraphStateData::LineJoin>(GetInteger(0))); 883 static_cast<CFX_GraphStateData::LineJoin>(GetInteger(0)));
884 } 884 }
885 885
886 void CPDF_StreamContentParser::Handle_SetLineCap() { 886 void CPDF_StreamContentParser::Handle_SetLineCap() {
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 } else { 1681 } else {
1682 PDF_ReplaceAbbr(pElement); 1682 PDF_ReplaceAbbr(pElement);
1683 } 1683 }
1684 } 1684 }
1685 break; 1685 break;
1686 } 1686 }
1687 default: 1687 default:
1688 break; 1688 break;
1689 } 1689 }
1690 } 1690 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698