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

Side by Side Diff: core/fpdfdoc/cpdf_annot.cpp

Issue 2270493002: Generate default AP stream for text annotation. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Generate default AP stream for text annotation. Created 4 years, 3 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 | « DEPS ('k') | core/fpdfdoc/cpvt_generateap.h » ('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 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/fpdfdoc/include/cpdf_annot.h" 7 #include "core/fpdfdoc/include/cpdf_annot.h"
8 8
9 #include "core/fpdfapi/fpdf_page/include/cpdf_form.h" 9 #include "core/fpdfapi/fpdf_page/include/cpdf_form.h"
10 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" 10 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h"
(...skipping 16 matching lines...) Expand all
27 else if (m_sSubtype == "Highlight") 27 else if (m_sSubtype == "Highlight")
28 CPVT_GenerateAP::GenerateHighlightAP(m_pDocument, m_pAnnotDict); 28 CPVT_GenerateAP::GenerateHighlightAP(m_pDocument, m_pAnnotDict);
29 else if (m_sSubtype == "Ink") 29 else if (m_sSubtype == "Ink")
30 CPVT_GenerateAP::GenerateInkAP(m_pDocument, m_pAnnotDict); 30 CPVT_GenerateAP::GenerateInkAP(m_pDocument, m_pAnnotDict);
31 else if (m_sSubtype == "Square") 31 else if (m_sSubtype == "Square")
32 CPVT_GenerateAP::GenerateSquareAP(m_pDocument, m_pAnnotDict); 32 CPVT_GenerateAP::GenerateSquareAP(m_pDocument, m_pAnnotDict);
33 else if (m_sSubtype == "Squiggly") 33 else if (m_sSubtype == "Squiggly")
34 CPVT_GenerateAP::GenerateSquigglyAP(m_pDocument, m_pAnnotDict); 34 CPVT_GenerateAP::GenerateSquigglyAP(m_pDocument, m_pAnnotDict);
35 else if (m_sSubtype == "StrikeOut") 35 else if (m_sSubtype == "StrikeOut")
36 CPVT_GenerateAP::GenerateStrikeOutAP(m_pDocument, m_pAnnotDict); 36 CPVT_GenerateAP::GenerateStrikeOutAP(m_pDocument, m_pAnnotDict);
37 else if (m_sSubtype == "Text")
38 CPVT_GenerateAP::GenerateTextAP(m_pDocument, m_pAnnotDict);
37 else if (m_sSubtype == "Underline") 39 else if (m_sSubtype == "Underline")
38 CPVT_GenerateAP::GenerateUnderlineAP(m_pDocument, m_pAnnotDict); 40 CPVT_GenerateAP::GenerateUnderlineAP(m_pDocument, m_pAnnotDict);
39 } 41 }
40 42
41 CPDF_Annot::~CPDF_Annot() { 43 CPDF_Annot::~CPDF_Annot() {
42 ClearCachedAP(); 44 ClearCachedAP();
43 } 45 }
44 46
45 void CPDF_Annot::ClearCachedAP() { 47 void CPDF_Annot::ClearCachedAP() {
46 m_APMap.clear(); 48 m_APMap.clear();
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 CFX_PathData path; 266 CFX_PathData path;
265 width /= 2; 267 width /= 2;
266 path.AppendRect(rect.left + width, rect.bottom + width, rect.right - width, 268 path.AppendRect(rect.left + width, rect.bottom + width, rect.right - width,
267 rect.top - width); 269 rect.top - width);
268 int fill_type = 0; 270 int fill_type = 0;
269 if (pOptions && (pOptions->m_Flags & RENDER_NOPATHSMOOTH)) { 271 if (pOptions && (pOptions->m_Flags & RENDER_NOPATHSMOOTH)) {
270 fill_type |= FXFILL_NOPATHSMOOTH; 272 fill_type |= FXFILL_NOPATHSMOOTH;
271 } 273 }
272 pDevice->DrawPath(&path, pUser2Device, &graph_state, argb, argb, fill_type); 274 pDevice->DrawPath(&path, pUser2Device, &graph_state, argb, argb, fill_type);
273 } 275 }
OLDNEW
« no previous file with comments | « DEPS ('k') | core/fpdfdoc/cpvt_generateap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698