OLD | NEW |
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/src/fgas/layout/fgas_unicode.h" | 7 #include "xfa/fgas/layout/fgas_unicode.h" |
8 | 8 |
9 void FX_TEXTLAYOUT_PieceSort(CFX_TPOArray& tpos, int32_t iStart, int32_t iEnd) { | 9 void FX_TEXTLAYOUT_PieceSort(CFX_TPOArray& tpos, int32_t iStart, int32_t iEnd) { |
10 FXSYS_assert(iStart > -1 && iStart < tpos.GetSize()); | 10 FXSYS_assert(iStart > -1 && iStart < tpos.GetSize()); |
11 FXSYS_assert(iEnd > -1 && iEnd < tpos.GetSize()); | 11 FXSYS_assert(iEnd > -1 && iEnd < tpos.GetSize()); |
12 if (iStart >= iEnd) { | 12 if (iStart >= iEnd) { |
13 return; | 13 return; |
14 } | 14 } |
15 int32_t i = iStart, j = iEnd; | 15 int32_t i = iStart, j = iEnd; |
16 FX_TPO *pCur = tpos.GetPtrAt(iStart), *pSort; | 16 FX_TPO *pCur = tpos.GetPtrAt(iStart), *pSort; |
17 int32_t v = pCur->pos; | 17 int32_t v = pCur->pos; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 case FX_JAPCHARPROPERTYEX_Center: | 108 case FX_JAPCHARPROPERTYEX_Center: |
109 ptOffset.x = fFontSize * (600 - rtBBox.right()) / 1000.0f; | 109 ptOffset.x = fFontSize * (600 - rtBBox.right()) / 1000.0f; |
110 break; | 110 break; |
111 case FX_JAPCHARPROPERTYEX_Right: | 111 case FX_JAPCHARPROPERTYEX_Right: |
112 ptOffset.x = fFontSize * (950 - rtBBox.right()) / 1000.0f; | 112 ptOffset.x = fFontSize * (950 - rtBBox.right()) / 1000.0f; |
113 break; | 113 break; |
114 } | 114 } |
115 } | 115 } |
116 return TRUE; | 116 return TRUE; |
117 } | 117 } |
OLD | NEW |