| 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 "../../include/pdfwindow/PDFWindow.h" | 7 #include "../../include/pdfwindow/PDFWindow.h" |
| 8 #include "../../include/pdfwindow/PWL_Wnd.h" | 8 #include "../../include/pdfwindow/PWL_Wnd.h" |
| 9 #include "../../include/pdfwindow/PWL_Icon.h" | 9 #include "../../include/pdfwindow/PWL_Icon.h" |
| 10 #include "../../include/pdfwindow/PWL_Utils.h" | 10 #include "../../include/pdfwindow/PWL_Utils.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 return FALSE; | 153 return FALSE; |
| 154 } | 154 } |
| 155 | 155 |
| 156 void CPWL_Icon::GetIconPosition(FX_FLOAT & fLeft, FX_FLOAT & fBottom) | 156 void CPWL_Icon::GetIconPosition(FX_FLOAT & fLeft, FX_FLOAT & fBottom) |
| 157 { | 157 { |
| 158 if (m_pIconFit) | 158 if (m_pIconFit) |
| 159 { | 159 { |
| 160 //m_pIconFit->GetIconPosition(fLeft,fBottom); | 160 //m_pIconFit->GetIconPosition(fLeft,fBottom); |
| 161 fLeft = 0.0f; | 161 fLeft = 0.0f; |
| 162 fBottom = 0.0f; | 162 fBottom = 0.0f; |
| 163 » » CPDF_Array* pA = m_pIconFit->m_pDict->GetArray("A"); | 163 » » CPDF_Array* pA = m_pIconFit->m_pDict ? m_pIconFit->m_pDict->GetA
rray("A") : NULL; |
| 164 if (pA != NULL) | 164 if (pA != NULL) |
| 165 { | 165 { |
| 166 FX_DWORD dwCount = pA->GetCount(); | 166 FX_DWORD dwCount = pA->GetCount(); |
| 167 if (dwCount > 0) fLeft = pA->GetNumber(0); | 167 if (dwCount > 0) fLeft = pA->GetNumber(0); |
| 168 if (dwCount > 1) fBottom = pA->GetNumber(1); | 168 if (dwCount > 1) fBottom = pA->GetNumber(1); |
| 169 } | 169 } |
| 170 } | 170 } |
| 171 else | 171 else |
| 172 { | 172 { |
| 173 fLeft = 0.0f; | 173 fLeft = 0.0f; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 263 |
| 264 FX_FLOAT fPlateWidth,fPlateHeight; | 264 FX_FLOAT fPlateWidth,fPlateHeight; |
| 265 CPDF_Rect rcPlate = this->GetClientRect(); | 265 CPDF_Rect rcPlate = this->GetClientRect(); |
| 266 fPlateWidth = rcPlate.right - rcPlate.left; | 266 fPlateWidth = rcPlate.right - rcPlate.left; |
| 267 fPlateHeight = rcPlate.top - rcPlate.bottom; | 267 fPlateHeight = rcPlate.top - rcPlate.bottom; |
| 268 | 268 |
| 269 x = (fPlateWidth - fImageFactWidth) * fLeft; | 269 x = (fPlateWidth - fImageFactWidth) * fLeft; |
| 270 y = (fPlateHeight - fImageFactHeight) * fBottom; | 270 y = (fPlateHeight - fImageFactHeight) * fBottom; |
| 271 } | 271 } |
| 272 | 272 |
| OLD | NEW |