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

Side by Side Diff: xfa/fde/fde_render.cpp

Issue 1830323006: Remove FX_DWORD from XFA. (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 | « xfa/fde/fde_iterator.cpp ('k') | xfa/fde/tto/fde_textout.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 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 "xfa/fde/fde_render.h" 7 #include "xfa/fde/fde_render.h"
8 8
9 #include "xfa/fde/fde_renderdevice.h" 9 #include "xfa/fde/fde_renderdevice.h"
10 #include "xfa/fgas/crt/fgas_memory.h" 10 #include "xfa/fgas/crt/fgas_memory.h"
(...skipping 30 matching lines...) Expand all
41 int32_t m_iCharPosCount; 41 int32_t m_iCharPosCount;
42 IFDE_VisualSetIterator* m_pIterator; 42 IFDE_VisualSetIterator* m_pIterator;
43 }; 43 };
44 44
45 } // namespace 45 } // namespace
46 46
47 void FDE_GetPageMatrix(CFX_Matrix& pageMatrix, 47 void FDE_GetPageMatrix(CFX_Matrix& pageMatrix,
48 const CFX_RectF& docPageRect, 48 const CFX_RectF& docPageRect,
49 const CFX_Rect& devicePageRect, 49 const CFX_Rect& devicePageRect,
50 int32_t iRotate, 50 int32_t iRotate,
51 FX_DWORD dwCoordinatesType) { 51 uint32_t dwCoordinatesType) {
52 FXSYS_assert(iRotate >= 0 && iRotate <= 3); 52 FXSYS_assert(iRotate >= 0 && iRotate <= 3);
53 FX_BOOL bFlipX = (dwCoordinatesType & 0x01) != 0; 53 FX_BOOL bFlipX = (dwCoordinatesType & 0x01) != 0;
54 FX_BOOL bFlipY = (dwCoordinatesType & 0x02) != 0; 54 FX_BOOL bFlipY = (dwCoordinatesType & 0x02) != 0;
55 CFX_Matrix m; 55 CFX_Matrix m;
56 m.Set((bFlipX ? -1.0f : 1.0f), 0, 0, (bFlipY ? -1.0f : 1.0f), 0, 0); 56 m.Set((bFlipX ? -1.0f : 1.0f), 0, 0, (bFlipY ? -1.0f : 1.0f), 0, 0);
57 if (iRotate == 0 || iRotate == 2) { 57 if (iRotate == 0 || iRotate == 2) {
58 m.a *= (FX_FLOAT)devicePageRect.width / docPageRect.width; 58 m.a *= (FX_FLOAT)devicePageRect.width / docPageRect.width;
59 m.d *= (FX_FLOAT)devicePageRect.height / docPageRect.height; 59 m.d *= (FX_FLOAT)devicePageRect.height / docPageRect.height;
60 } else { 60 } else {
61 m.a *= (FX_FLOAT)devicePageRect.height / docPageRect.width; 61 m.a *= (FX_FLOAT)devicePageRect.height / docPageRect.width;
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 rtClip.Offset(rtObj.left, rtObj.top); 281 rtClip.Offset(rtObj.left, rtObj.top);
282 m_Transform.TransformRect(rtClip); 282 m_Transform.TransformRect(rtClip);
283 const CFX_RectF& rtDevClip = m_pRenderDevice->GetClipRect(); 283 const CFX_RectF& rtDevClip = m_pRenderDevice->GetClipRect();
284 rtClip.Intersect(rtDevClip); 284 rtClip.Intersect(rtDevClip);
285 hState = m_pRenderDevice->SaveState(); 285 hState = m_pRenderDevice->SaveState();
286 return m_pRenderDevice->SetClipRect(rtClip); 286 return m_pRenderDevice->SetClipRect(rtClip);
287 } 287 }
288 void CFDE_RenderContext::RestoreClip(FDE_HDEVICESTATE hState) { 288 void CFDE_RenderContext::RestoreClip(FDE_HDEVICESTATE hState) {
289 m_pRenderDevice->RestoreState(hState); 289 m_pRenderDevice->RestoreState(hState);
290 } 290 }
OLDNEW
« no previous file with comments | « xfa/fde/fde_iterator.cpp ('k') | xfa/fde/tto/fde_textout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698