Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: fpdfsdk/src/pdfwindow/PWL_Signature.cpp

Issue 1566583002: Merge to XFA: Remove header files that only have includes. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Fix XFA Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp ('k') | fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/include/pdfwindow/PDFWindow.h"
8 #include "fpdfsdk/include/pdfwindow/PWL_Icon.h" 7 #include "fpdfsdk/include/pdfwindow/PWL_Icon.h"
9 #include "fpdfsdk/include/pdfwindow/PWL_Label.h" 8 #include "fpdfsdk/include/pdfwindow/PWL_Label.h"
10 #include "fpdfsdk/include/pdfwindow/PWL_Signature.h" 9 #include "fpdfsdk/include/pdfwindow/PWL_Signature.h"
11 #include "fpdfsdk/include/pdfwindow/PWL_Utils.h" 10 #include "fpdfsdk/include/pdfwindow/PWL_Utils.h"
12 #include "fpdfsdk/include/pdfwindow/PWL_Wnd.h" 11 #include "fpdfsdk/include/pdfwindow/PWL_Wnd.h"
13 12
14 /* --------------------------------- CPWL_Signature_Image
15 * --------------------------------- */
16
17 CPWL_Signature_Image::CPWL_Signature_Image() : m_pImage(NULL) {} 13 CPWL_Signature_Image::CPWL_Signature_Image() : m_pImage(NULL) {}
18 14
19 CPWL_Signature_Image::~CPWL_Signature_Image() {} 15 CPWL_Signature_Image::~CPWL_Signature_Image() {}
20 16
21 void CPWL_Signature_Image::SetImage(CFX_DIBSource* pImage) { 17 void CPWL_Signature_Image::SetImage(CFX_DIBSource* pImage) {
22 m_pImage = pImage; 18 m_pImage = pImage;
23 } 19 }
24 20
25 CFX_DIBSource* CPWL_Signature_Image::GetImage() { 21 CFX_DIBSource* CPWL_Signature_Image::GetImage() {
26 return m_pImage; 22 return m_pImage;
(...skipping 24 matching lines...) Expand all
51 FX_FLOAT fImageW, fImageH; 47 FX_FLOAT fImageW, fImageH;
52 48
53 GetImageSize(fImageW, fImageH); 49 GetImageSize(fImageW, fImageH);
54 50
55 CPDF_Rect rcClient = GetClientRect(); 51 CPDF_Rect rcClient = GetClientRect();
56 52
57 fHScale = rcClient.Width() / fImageW; 53 fHScale = rcClient.Width() / fImageW;
58 fVScale = rcClient.Height() / fImageH; 54 fVScale = rcClient.Height() / fImageH;
59 } 55 }
60 56
61 /* --------------------------------- CPWL_Signature
62 * --------------------------------- */
63
64 CPWL_Signature::CPWL_Signature() 57 CPWL_Signature::CPWL_Signature()
65 : m_pText(NULL), 58 : m_pText(NULL),
66 m_pDescription(NULL), 59 m_pDescription(NULL),
67 m_pImage(NULL), 60 m_pImage(NULL),
68 m_bTextExist(TRUE), 61 m_bTextExist(TRUE),
69 m_bImageExist(FALSE), 62 m_bImageExist(FALSE),
70 m_bFlagExist(TRUE) {} 63 m_bFlagExist(TRUE) {}
71 64
72 CPWL_Signature::~CPWL_Signature() {} 65 CPWL_Signature::~CPWL_Signature() {}
73 66
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 dcp.dwFlags = PWS_CHILD | PWS_VISIBLE | PWS_AUTOFONTSIZE | PES_MULTILINE | 155 dcp.dwFlags = PWS_CHILD | PWS_VISIBLE | PWS_AUTOFONTSIZE | PES_MULTILINE |
163 PES_AUTORETURN | PES_LEFT | PES_CENTER; 156 PES_AUTORETURN | PES_LEFT | PES_CENTER;
164 dcp.sTextColor = CPWL_Color(COLORTYPE_GRAY, 0); 157 dcp.sTextColor = CPWL_Color(COLORTYPE_GRAY, 0);
165 m_pDescription->Create(dcp); 158 m_pDescription->Create(dcp);
166 } 159 }
167 160
168 void CPWL_Signature::DrawThisAppearance(CFX_RenderDevice* pDevice, 161 void CPWL_Signature::DrawThisAppearance(CFX_RenderDevice* pDevice,
169 CFX_Matrix* pUser2Device) { 162 CFX_Matrix* pUser2Device) {
170 CPWL_Wnd::DrawThisAppearance(pDevice, pUser2Device); 163 CPWL_Wnd::DrawThisAppearance(pDevice, pUser2Device);
171 164
172 if (m_bFlagExist) 165 if (m_bFlagExist) {
173 CPWL_Utils::DrawIconAppStream( 166 CPWL_Utils::DrawIconAppStream(
174 pDevice, pUser2Device, PWL_ICONTYPE_FOXIT, 167 pDevice, pUser2Device, PWL_ICONTYPE_FOXIT,
175 CPWL_Utils::GetCenterSquare(GetClientRect()), 168 CPWL_Utils::GetCenterSquare(GetClientRect()),
176 CPWL_Color(COLORTYPE_RGB, 0.91f, 0.855f, 0.92f), 169 CPWL_Color(COLORTYPE_RGB, 0.91f, 0.855f, 0.92f),
177 CPWL_Color(COLORTYPE_TRANSPARENT), 255); 170 CPWL_Color(COLORTYPE_TRANSPARENT), 255);
178 171 }
179 /*
180 CPDF_Rect rcClient = GetClientRect();
181
182 CFX_PathData path;
183
184 path.SetPointCount(2);
185 path.SetPoint(0, rcClient.left, (rcClient.top + rcClient.bottom) * 0.5f,
186 FXPT_MOVETO);
187 path.SetPoint(1, rcClient.right, (rcClient.top + rcClient.bottom) * 0.5f,
188 FXPT_LINETO);
189
190 CFX_GraphStateData gsd;
191 gsd.SetDashCount(2);
192 gsd.m_DashArray[0] = 6.0f;
193 gsd.m_DashArray[1] = 6.0f;
194 gsd.m_DashPhase = 0;
195
196 gsd.m_LineWidth = 10.0f;
197 pDevice->DrawPath(&path, pUser2Device, &gsd, 0, ArgbEncode(255,255,0,0),
198 FXFILL_ALTERNATE);
199 */
200 } 172 }
201 173
202 void CPWL_Signature::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) { 174 void CPWL_Signature::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) {
203 CPWL_Wnd::GetThisAppearanceStream(sAppStream); 175 CPWL_Wnd::GetThisAppearanceStream(sAppStream);
204 } 176 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp ('k') | fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698