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

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

Issue 1832173003: Remove FX_DWORD from core/ and delete definition (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « core/fpdfapi/fpdf_font/ttgsubtable.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_colorspace.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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/cpdf_allstates.h" 7 #include "core/fpdfapi/fpdf_page/cpdf_allstates.h"
8 8
9 #include "core/fpdfapi/fpdf_page/pageint.h" 9 #include "core/fpdfapi/fpdf_page/pageint.h"
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
(...skipping 29 matching lines...) Expand all
40 m_TextRise = src.m_TextRise; 40 m_TextRise = src.m_TextRise;
41 m_TextHorzScale = src.m_TextHorzScale; 41 m_TextHorzScale = src.m_TextHorzScale;
42 } 42 }
43 43
44 void CPDF_AllStates::SetLineDash(CPDF_Array* pArray, 44 void CPDF_AllStates::SetLineDash(CPDF_Array* pArray,
45 FX_FLOAT phase, 45 FX_FLOAT phase,
46 FX_FLOAT scale) { 46 FX_FLOAT scale) {
47 CFX_GraphStateData* pData = m_GraphState.GetModify(); 47 CFX_GraphStateData* pData = m_GraphState.GetModify();
48 pData->m_DashPhase = phase * scale; 48 pData->m_DashPhase = phase * scale;
49 pData->SetDashCount(pArray->GetCount()); 49 pData->SetDashCount(pArray->GetCount());
50 for (FX_DWORD i = 0; i < pArray->GetCount(); i++) { 50 for (uint32_t i = 0; i < pArray->GetCount(); i++) {
51 pData->m_DashArray[i] = pArray->GetNumberAt(i) * scale; 51 pData->m_DashArray[i] = pArray->GetNumberAt(i) * scale;
52 } 52 }
53 } 53 }
54 54
55 void CPDF_AllStates::ProcessExtGS(CPDF_Dictionary* pGS, 55 void CPDF_AllStates::ProcessExtGS(CPDF_Dictionary* pGS,
56 CPDF_StreamContentParser* pParser) { 56 CPDF_StreamContentParser* pParser) {
57 CPDF_GeneralStateData* pGeneralState = m_GeneralState.GetModify(); 57 CPDF_GeneralStateData* pGeneralState = m_GeneralState.GetModify();
58 for (const auto& it : *pGS) { 58 for (const auto& it : *pGS) {
59 const CFX_ByteString& key_str = it.first; 59 const CFX_ByteString& key_str = it.first;
60 CPDF_Object* pElement = it.second; 60 CPDF_Object* pElement = it.second;
61 CPDF_Object* pObject = pElement ? pElement->GetDirect() : nullptr; 61 CPDF_Object* pObject = pElement ? pElement->GetDirect() : nullptr;
62 if (!pObject) 62 if (!pObject)
63 continue; 63 continue;
64 64
65 FX_DWORD key = key_str.GetID(); 65 uint32_t key = key_str.GetID();
66 switch (key) { 66 switch (key) {
67 case FXBSTR_ID('L', 'W', 0, 0): 67 case FXBSTR_ID('L', 'W', 0, 0):
68 m_GraphState.GetModify()->m_LineWidth = pObject->GetNumber(); 68 m_GraphState.GetModify()->m_LineWidth = pObject->GetNumber();
69 break; 69 break;
70 case FXBSTR_ID('L', 'C', 0, 0): 70 case FXBSTR_ID('L', 'C', 0, 0):
71 m_GraphState.GetModify()->m_LineCap = 71 m_GraphState.GetModify()->m_LineCap =
72 (CFX_GraphStateData::LineCap)pObject->GetInteger(); 72 (CFX_GraphStateData::LineCap)pObject->GetInteger();
73 break; 73 break;
74 case FXBSTR_ID('L', 'J', 0, 0): 74 case FXBSTR_ID('L', 'J', 0, 0):
75 m_GraphState.GetModify()->m_LineJoin = 75 m_GraphState.GetModify()->m_LineJoin =
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 case FXBSTR_ID('A', 'I', 'S', 0): 177 case FXBSTR_ID('A', 'I', 'S', 0):
178 pGeneralState->m_AlphaSource = pObject->GetInteger(); 178 pGeneralState->m_AlphaSource = pObject->GetInteger();
179 break; 179 break;
180 case FXBSTR_ID('T', 'K', 0, 0): 180 case FXBSTR_ID('T', 'K', 0, 0):
181 pGeneralState->m_TextKnockout = pObject->GetInteger(); 181 pGeneralState->m_TextKnockout = pObject->GetInteger();
182 break; 182 break;
183 } 183 }
184 } 184 }
185 pGeneralState->m_Matrix = m_CTM; 185 pGeneralState->m_Matrix = m_CTM;
186 } 186 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_font/ttgsubtable.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_colorspace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698