OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 "core/fpdfapi/page/cpdf_meshstream.h" | 7 #include "core/fpdfapi/page/cpdf_meshstream.h" |
8 | 8 |
9 #include "core/fpdfapi/page/cpdf_colorspace.h" | 9 #include "core/fpdfapi/page/cpdf_colorspace.h" |
10 #include "core/fpdfapi/page/pageint.h" | 10 #include "core/fpdfapi/page/pageint.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 uint32_t CPDF_MeshStream::GetVertex(CPDF_MeshVertex& vertex, | 194 uint32_t CPDF_MeshStream::GetVertex(CPDF_MeshVertex& vertex, |
195 CFX_Matrix* pObject2Bitmap) { | 195 CFX_Matrix* pObject2Bitmap) { |
196 uint32_t flag = GetFlag(); | 196 uint32_t flag = GetFlag(); |
197 GetCoords(vertex.x, vertex.y); | 197 GetCoords(vertex.x, vertex.y); |
198 pObject2Bitmap->Transform(vertex.x, vertex.y); | 198 pObject2Bitmap->Transform(vertex.x, vertex.y); |
199 GetColor(vertex.r, vertex.g, vertex.b); | 199 GetColor(vertex.r, vertex.g, vertex.b); |
200 m_BitStream.ByteAlign(); | 200 m_BitStream.ByteAlign(); |
201 return flag; | 201 return flag; |
202 } | 202 } |
203 | 203 |
204 FX_BOOL CPDF_MeshStream::GetVertexRow(CPDF_MeshVertex* vertex, | 204 bool CPDF_MeshStream::GetVertexRow(CPDF_MeshVertex* vertex, |
205 int count, | 205 int count, |
206 CFX_Matrix* pObject2Bitmap) { | 206 CFX_Matrix* pObject2Bitmap) { |
207 for (int i = 0; i < count; i++) { | 207 for (int i = 0; i < count; i++) { |
208 if (m_BitStream.IsEOF()) | 208 if (m_BitStream.IsEOF()) |
209 return FALSE; | 209 return false; |
210 | 210 |
211 GetCoords(vertex[i].x, vertex[i].y); | 211 GetCoords(vertex[i].x, vertex[i].y); |
212 pObject2Bitmap->Transform(vertex[i].x, vertex[i].y); | 212 pObject2Bitmap->Transform(vertex[i].x, vertex[i].y); |
213 GetColor(vertex[i].r, vertex[i].g, vertex[i].b); | 213 GetColor(vertex[i].r, vertex[i].g, vertex[i].b); |
214 m_BitStream.ByteAlign(); | 214 m_BitStream.ByteAlign(); |
215 } | 215 } |
216 return TRUE; | 216 return true; |
217 } | 217 } |
OLD | NEW |