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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 default: | 118 default: |
119 m_iTxtBkAlignment = FX_TXTLINEALIGNMENT_Left; | 119 m_iTxtBkAlignment = FX_TXTLINEALIGNMENT_Left; |
120 break; | 120 break; |
121 } | 121 } |
122 m_pTxtBreak->SetAlignment(m_iTxtBkAlignment); | 122 m_pTxtBreak->SetAlignment(m_iTxtBkAlignment); |
123 } | 123 } |
124 void CFDE_TextOut::SetLineSpace(FX_FLOAT fLineSpace) { | 124 void CFDE_TextOut::SetLineSpace(FX_FLOAT fLineSpace) { |
125 ASSERT(fLineSpace > 1.0f); | 125 ASSERT(fLineSpace > 1.0f); |
126 m_fLineSpace = fLineSpace; | 126 m_fLineSpace = fLineSpace; |
127 } | 127 } |
| 128 |
128 void CFDE_TextOut::SetDIBitmap(CFX_DIBitmap* pDIB) { | 129 void CFDE_TextOut::SetDIBitmap(CFX_DIBitmap* pDIB) { |
129 ASSERT(pDIB); | 130 ASSERT(pDIB); |
130 | 131 |
131 m_pRenderDevice.reset(); | 132 m_pRenderDevice.reset(); |
132 CFX_FxgeDevice* device = new CFX_FxgeDevice; | 133 CFX_FxgeDevice* device = new CFX_FxgeDevice; |
133 device->Attach(pDIB, 0, FALSE); | 134 device->Attach(pDIB, false, nullptr, false); |
134 m_pRenderDevice.reset(new CFDE_RenderDevice(device, FALSE)); | 135 m_pRenderDevice.reset(new CFDE_RenderDevice(device, FALSE)); |
135 } | 136 } |
136 | 137 |
137 void CFDE_TextOut::SetRenderDevice(CFX_RenderDevice* pDevice) { | 138 void CFDE_TextOut::SetRenderDevice(CFX_RenderDevice* pDevice) { |
138 ASSERT(pDevice); | 139 ASSERT(pDevice); |
139 m_pRenderDevice.reset(new CFDE_RenderDevice(pDevice, FALSE)); | 140 m_pRenderDevice.reset(new CFDE_RenderDevice(pDevice, FALSE)); |
140 } | 141 } |
141 | 142 |
142 void CFDE_TextOut::SetClipRect(const CFX_Rect& rtClip) { | 143 void CFDE_TextOut::SetClipRect(const CFX_Rect& rtClip) { |
143 m_rtClip.Set((FX_FLOAT)rtClip.left, (FX_FLOAT)rtClip.top, | 144 m_rtClip.Set((FX_FLOAT)rtClip.left, (FX_FLOAT)rtClip.top, |
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 return NULL; | 935 return NULL; |
935 } | 936 } |
936 return m_pieces.GetPtrAt(index); | 937 return m_pieces.GetPtrAt(index); |
937 } | 938 } |
938 void CFDE_TTOLine::RemoveLast(int32_t iCount) { | 939 void CFDE_TTOLine::RemoveLast(int32_t iCount) { |
939 m_pieces.RemoveLast(iCount); | 940 m_pieces.RemoveLast(iCount); |
940 } | 941 } |
941 void CFDE_TTOLine::RemoveAll(FX_BOOL bLeaveMemory) { | 942 void CFDE_TTOLine::RemoveAll(FX_BOOL bLeaveMemory) { |
942 m_pieces.RemoveAll(bLeaveMemory); | 943 m_pieces.RemoveAll(bLeaveMemory); |
943 } | 944 } |
OLD | NEW |