| 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/fde/fde_gedevice.h" | 7 #include "xfa/fde/fde_gedevice.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 pAM[3] = mc * pAM[1] + pAM[3]; | 151 pAM[3] = mc * pAM[1] + pAM[3]; |
| 152 pCP++; | 152 pCP++; |
| 153 } | 153 } |
| 154 } | 154 } |
| 155 FXTEXT_CHARPOS* pCP = (FXTEXT_CHARPOS*)pCharPos; | 155 FXTEXT_CHARPOS* pCP = (FXTEXT_CHARPOS*)pCharPos; |
| 156 IFX_Font* pCurFont = NULL; | 156 IFX_Font* pCurFont = NULL; |
| 157 IFX_Font* pSTFont = NULL; | 157 IFX_Font* pSTFont = NULL; |
| 158 FXTEXT_CHARPOS* pCurCP = NULL; | 158 FXTEXT_CHARPOS* pCurCP = NULL; |
| 159 int32_t iCurCount = 0; | 159 int32_t iCurCount = 0; |
| 160 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ | 160 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ |
| 161 FX_DWORD dwFontStyle = pFont->GetFontStyles(); | 161 uint32_t dwFontStyle = pFont->GetFontStyles(); |
| 162 CFX_Font FxFont; | 162 CFX_Font FxFont; |
| 163 CFX_SubstFont SubstFxFont; | 163 CFX_SubstFont SubstFxFont; |
| 164 FxFont.SetSubstFont(&SubstFxFont); | 164 FxFont.SetSubstFont(&SubstFxFont); |
| 165 SubstFxFont.m_Weight = dwFontStyle & FX_FONTSTYLE_Bold ? 700 : 400; | 165 SubstFxFont.m_Weight = dwFontStyle & FX_FONTSTYLE_Bold ? 700 : 400; |
| 166 SubstFxFont.m_WeightCJK = SubstFxFont.m_Weight; | 166 SubstFxFont.m_WeightCJK = SubstFxFont.m_Weight; |
| 167 SubstFxFont.m_ItalicAngle = dwFontStyle & FX_FONTSTYLE_Italic ? -12 : 0; | 167 SubstFxFont.m_ItalicAngle = dwFontStyle & FX_FONTSTYLE_Italic ? -12 : 0; |
| 168 SubstFxFont.m_bItlicCJK = !!(dwFontStyle & FX_FONTSTYLE_Italic); | 168 SubstFxFont.m_bItlicCJK = !!(dwFontStyle & FX_FONTSTYLE_Italic); |
| 169 #endif // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ | 169 #endif // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ |
| 170 for (int32_t i = 0; i < iCount; ++i) { | 170 for (int32_t i = 0; i < iCount; ++i) { |
| 171 pSTFont = pFont->GetSubstFont((int32_t)pCP->m_GlyphIndex); | 171 pSTFont = pFont->GetSubstFont((int32_t)pCP->m_GlyphIndex); |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 dev.DrawCosmeticLine(pt0.x, pt0.y, pt1.x, pt1.y, cr0); | 564 dev.DrawCosmeticLine(pt0.x, pt0.y, pt1.x, pt1.y, cr0); |
| 565 pt1.x += dx; | 565 pt1.x += dx; |
| 566 pt0.y += dy; | 566 pt0.y += dy; |
| 567 a0 += da; | 567 a0 += da; |
| 568 r0 += dr; | 568 r0 += dr; |
| 569 g0 += dg; | 569 g0 += dg; |
| 570 b0 += db; | 570 b0 += db; |
| 571 } | 571 } |
| 572 return WrapTexture(pLinearBrush->GetWrapMode(), &bmp, pPath, pMatrix); | 572 return WrapTexture(pLinearBrush->GetWrapMode(), &bmp, pPath, pMatrix); |
| 573 } | 573 } |
| OLD | NEW |