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

Side by Side Diff: core/fpdfapi/render/cpdf_transferfunc.cpp

Issue 2551593002: Rename fpdf_render_image and fpdf_render_text (Closed)
Patch Set: Remove commented Created 4 years 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/fpdfapi/render/cpdf_textrenderer.cpp ('k') | core/fpdfapi/render/fpdf_render_image.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 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/fpdfapi/render/cpdf_transferfunc.h" 7 #include "core/fpdfapi/render/cpdf_transferfunc.h"
8 8
9 #include "core/fpdfapi/parser/cpdf_document.h" 9 #include "core/fpdfapi/parser/cpdf_document.h"
10 #include "core/fpdfapi/render/render_int.h" 10 #include "core/fpdfapi/render/cpdf_dibtransferfunc.h"
11 11
12 CPDF_TransferFunc::CPDF_TransferFunc(CPDF_Document* pDoc) : m_pPDFDoc(pDoc) {} 12 CPDF_TransferFunc::CPDF_TransferFunc(CPDF_Document* pDoc) : m_pPDFDoc(pDoc) {}
13 13
14 FX_COLORREF CPDF_TransferFunc::TranslateColor(FX_COLORREF rgb) const { 14 FX_COLORREF CPDF_TransferFunc::TranslateColor(FX_COLORREF rgb) const {
15 return FXSYS_RGB(m_Samples[FXSYS_GetRValue(rgb)], 15 return FXSYS_RGB(m_Samples[FXSYS_GetRValue(rgb)],
16 m_Samples[256 + FXSYS_GetGValue(rgb)], 16 m_Samples[256 + FXSYS_GetGValue(rgb)],
17 m_Samples[512 + FXSYS_GetBValue(rgb)]); 17 m_Samples[512 + FXSYS_GetBValue(rgb)]);
18 } 18 }
19 19
20 CFX_DIBSource* CPDF_TransferFunc::TranslateImage(const CFX_DIBSource* pSrc, 20 CFX_DIBSource* CPDF_TransferFunc::TranslateImage(const CFX_DIBSource* pSrc,
21 bool bAutoDropSrc) { 21 bool bAutoDropSrc) {
22 CPDF_DIBTransferFunc* pDest = new CPDF_DIBTransferFunc(this); 22 CPDF_DIBTransferFunc* pDest = new CPDF_DIBTransferFunc(this);
23 pDest->LoadSrc(pSrc, bAutoDropSrc); 23 pDest->LoadSrc(pSrc, bAutoDropSrc);
24 return pDest; 24 return pDest;
25 } 25 }
OLDNEW
« no previous file with comments | « core/fpdfapi/render/cpdf_textrenderer.cpp ('k') | core/fpdfapi/render/fpdf_render_image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698