| 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 "fpdfsdk/pdfwindow/PWL_Signature.h" | 7 #include "fpdfsdk/pdfwindow/PWL_Signature.h" |
| 8 | 8 |
| 9 #include "core/fxge/include/fx_ge.h" | 9 #include "core/fxge/include/fx_ge.h" |
| 10 #include "fpdfsdk/pdfwindow/PWL_Icon.h" | 10 #include "fpdfsdk/pdfwindow/PWL_Icon.h" |
| 11 #include "fpdfsdk/pdfwindow/PWL_Label.h" | 11 #include "fpdfsdk/pdfwindow/PWL_Label.h" |
| 12 #include "fpdfsdk/pdfwindow/PWL_Utils.h" | 12 #include "fpdfsdk/pdfwindow/PWL_Utils.h" |
| 13 #include "fpdfsdk/pdfwindow/PWL_Wnd.h" | 13 #include "fpdfsdk/pdfwindow/PWL_Wnd.h" |
| 14 | 14 |
| 15 CPWL_Signature_Image::CPWL_Signature_Image() : m_pImage(NULL) {} | 15 CPWL_Signature_Image::CPWL_Signature_Image() : m_pImage(nullptr) {} |
| 16 | 16 |
| 17 CPWL_Signature_Image::~CPWL_Signature_Image() {} | 17 CPWL_Signature_Image::~CPWL_Signature_Image() {} |
| 18 | 18 |
| 19 void CPWL_Signature_Image::SetImage(CFX_DIBSource* pImage) { | 19 void CPWL_Signature_Image::SetImage(CFX_DIBSource* pImage) { |
| 20 m_pImage = pImage; | 20 m_pImage = pImage; |
| 21 } | 21 } |
| 22 | 22 |
| 23 CFX_DIBSource* CPWL_Signature_Image::GetImage() { | 23 CFX_DIBSource* CPWL_Signature_Image::GetImage() { |
| 24 return m_pImage; | 24 return m_pImage; |
| 25 } | 25 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 50 | 50 |
| 51 GetImageSize(fImageW, fImageH); | 51 GetImageSize(fImageW, fImageH); |
| 52 | 52 |
| 53 CFX_FloatRect rcClient = GetClientRect(); | 53 CFX_FloatRect rcClient = GetClientRect(); |
| 54 | 54 |
| 55 fHScale = rcClient.Width() / fImageW; | 55 fHScale = rcClient.Width() / fImageW; |
| 56 fVScale = rcClient.Height() / fImageH; | 56 fVScale = rcClient.Height() / fImageH; |
| 57 } | 57 } |
| 58 | 58 |
| 59 CPWL_Signature::CPWL_Signature() | 59 CPWL_Signature::CPWL_Signature() |
| 60 : m_pText(NULL), | 60 : m_pText(nullptr), |
| 61 m_pDescription(NULL), | 61 m_pDescription(nullptr), |
| 62 m_pImage(NULL), | 62 m_pImage(nullptr), |
| 63 m_bTextExist(TRUE), | 63 m_bTextExist(TRUE), |
| 64 m_bImageExist(FALSE), | 64 m_bImageExist(FALSE), |
| 65 m_bFlagExist(TRUE) {} | 65 m_bFlagExist(TRUE) {} |
| 66 | 66 |
| 67 CPWL_Signature::~CPWL_Signature() {} | 67 CPWL_Signature::~CPWL_Signature() {} |
| 68 | 68 |
| 69 void CPWL_Signature::SetTextFlag(FX_BOOL bTextExist) { | 69 void CPWL_Signature::SetTextFlag(FX_BOOL bTextExist) { |
| 70 m_bTextExist = bTextExist; | 70 m_bTextExist = bTextExist; |
| 71 | 71 |
| 72 RePosChildWnd(); | 72 RePosChildWnd(); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 pDevice, pUser2Device, PWL_ICONTYPE_FOXIT, | 169 pDevice, pUser2Device, PWL_ICONTYPE_FOXIT, |
| 170 CPWL_Utils::GetCenterSquare(GetClientRect()), | 170 CPWL_Utils::GetCenterSquare(GetClientRect()), |
| 171 CPWL_Color(COLORTYPE_RGB, 0.91f, 0.855f, 0.92f), | 171 CPWL_Color(COLORTYPE_RGB, 0.91f, 0.855f, 0.92f), |
| 172 CPWL_Color(COLORTYPE_TRANSPARENT), 255); | 172 CPWL_Color(COLORTYPE_TRANSPARENT), 255); |
| 173 } | 173 } |
| 174 } | 174 } |
| 175 | 175 |
| 176 void CPWL_Signature::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) { | 176 void CPWL_Signature::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) { |
| 177 CPWL_Wnd::GetThisAppearanceStream(sAppStream); | 177 CPWL_Wnd::GetThisAppearanceStream(sAppStream); |
| 178 } | 178 } |
| OLD | NEW |