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

Side by Side Diff: core/src/fpdfdoc/doc_annot.cpp

Issue 1177483002: Use stdint.h types throughout PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 6 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 | « core/src/fpdfdoc/doc_action.cpp ('k') | core/src/fpdfdoc/doc_ap.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 "../../../third_party/base/nonstd_unique_ptr.h" 7 #include "../../../third_party/base/nonstd_unique_ptr.h"
8 #include "../../include/fpdfdoc/fpdf_doc.h" 8 #include "../../include/fpdfdoc/fpdf_doc.h"
9 #include "../../include/fpdfapi/fpdf_pageobj.h" 9 #include "../../include/fpdfapi/fpdf_pageobj.h"
10 10
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 pDashArray = pBS->GetArray("D"); 322 pDashArray = pBS->GetArray("D");
323 style_char = style[1]; 323 style_char = style[1];
324 width = pBS->GetNumber("W"); 324 width = pBS->GetNumber("W");
325 } 325 }
326 if (width <= 0) { 326 if (width <= 0) {
327 return; 327 return;
328 } 328 }
329 CPDF_Array* pColor = m_pAnnotDict->GetArray("C"); 329 CPDF_Array* pColor = m_pAnnotDict->GetArray("C");
330 FX_DWORD argb = 0xff000000; 330 FX_DWORD argb = 0xff000000;
331 if (pColor != NULL) { 331 if (pColor != NULL) {
332 int R = (FX_INT32)(pColor->GetNumber(0) * 255); 332 int R = (int32_t)(pColor->GetNumber(0) * 255);
333 int G = (FX_INT32)(pColor->GetNumber(1) * 255); 333 int G = (int32_t)(pColor->GetNumber(1) * 255);
334 int B = (FX_INT32)(pColor->GetNumber(2) * 255); 334 int B = (int32_t)(pColor->GetNumber(2) * 255);
335 argb = ArgbEncode(0xff, R, G, B); 335 argb = ArgbEncode(0xff, R, G, B);
336 } 336 }
337 CPDF_GraphStateData graph_state; 337 CPDF_GraphStateData graph_state;
338 graph_state.m_LineWidth = width; 338 graph_state.m_LineWidth = width;
339 if (style_char == 'D') { 339 if (style_char == 'D') {
340 if (pDashArray) { 340 if (pDashArray) {
341 FX_DWORD dash_count = pDashArray->GetCount(); 341 FX_DWORD dash_count = pDashArray->GetCount();
342 if (dash_count % 2) { 342 if (dash_count % 2) {
343 dash_count++; 343 dash_count++;
344 } 344 }
(...skipping 16 matching lines...) Expand all
361 GetRect(rect); 361 GetRect(rect);
362 CPDF_PathData path; 362 CPDF_PathData path;
363 width /= 2; 363 width /= 2;
364 path.AppendRect(rect.left + width, rect.bottom + width, rect.right - width, rect.top - width); 364 path.AppendRect(rect.left + width, rect.bottom + width, rect.right - width, rect.top - width);
365 int fill_type = 0; 365 int fill_type = 0;
366 if (pOptions && (pOptions->m_Flags & RENDER_NOPATHSMOOTH)) { 366 if (pOptions && (pOptions->m_Flags & RENDER_NOPATHSMOOTH)) {
367 fill_type |= FXFILL_NOPATHSMOOTH; 367 fill_type |= FXFILL_NOPATHSMOOTH;
368 } 368 }
369 pDevice->DrawPath(&path, pUser2Device, &graph_state, argb, argb, fill_type); 369 pDevice->DrawPath(&path, pUser2Device, &graph_state, argb, argb, fill_type);
370 } 370 }
OLDNEW
« no previous file with comments | « core/src/fpdfdoc/doc_action.cpp ('k') | core/src/fpdfdoc/doc_ap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698