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/tto/fde_textout.h" | 7 #include "xfa/fde/tto/fde_textout.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 m_rtClip.Reset(); | 46 m_rtClip.Reset(); |
47 m_rtLogicClip.Reset(); | 47 m_rtLogicClip.Reset(); |
48 } | 48 } |
49 CFDE_TextOut::~CFDE_TextOut() { | 49 CFDE_TextOut::~CFDE_TextOut() { |
50 delete m_pTxtBreak; | 50 delete m_pTxtBreak; |
51 FX_Free(m_pCharWidths); | 51 FX_Free(m_pCharWidths); |
52 FX_Free(m_pEllCharWidths); | 52 FX_Free(m_pEllCharWidths); |
53 FX_Free(m_pCharPos); | 53 FX_Free(m_pCharPos); |
54 m_ttoLines.RemoveAll(); | 54 m_ttoLines.RemoveAll(); |
55 } | 55 } |
56 void CFDE_TextOut::SetFont(IFGAS_Font* pFont) { | 56 void CFDE_TextOut::SetFont(CFGAS_GEFont* pFont) { |
57 ASSERT(pFont); | 57 ASSERT(pFont); |
58 m_pFont = pFont; | 58 m_pFont = pFont; |
59 m_pTxtBreak->SetFont(pFont); | 59 m_pTxtBreak->SetFont(pFont); |
60 } | 60 } |
61 void CFDE_TextOut::SetFontSize(FX_FLOAT fFontSize) { | 61 void CFDE_TextOut::SetFontSize(FX_FLOAT fFontSize) { |
62 ASSERT(fFontSize > 0); | 62 ASSERT(fFontSize > 0); |
63 m_fFontSize = fFontSize; | 63 m_fFontSize = fFontSize; |
64 m_pTxtBreak->SetFontSize(fFontSize); | 64 m_pTxtBreak->SetFontSize(fFontSize); |
65 } | 65 } |
66 void CFDE_TextOut::SetTextColor(FX_ARGB color) { | 66 void CFDE_TextOut::SetTextColor(FX_ARGB color) { |
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 return NULL; | 931 return NULL; |
932 } | 932 } |
933 return m_pieces.GetPtrAt(index); | 933 return m_pieces.GetPtrAt(index); |
934 } | 934 } |
935 void CFDE_TTOLine::RemoveLast(int32_t iCount) { | 935 void CFDE_TTOLine::RemoveLast(int32_t iCount) { |
936 m_pieces.RemoveLast(iCount); | 936 m_pieces.RemoveLast(iCount); |
937 } | 937 } |
938 void CFDE_TTOLine::RemoveAll(FX_BOOL bLeaveMemory) { | 938 void CFDE_TTOLine::RemoveAll(FX_BOOL bLeaveMemory) { |
939 m_pieces.RemoveAll(bLeaveMemory); | 939 m_pieces.RemoveAll(bLeaveMemory); |
940 } | 940 } |
OLD | NEW |