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

Side by Side Diff: core/include/fpdfapi/fpdf_resource.h

Issue 1783933002: Change colorspace's number of components to be unsigned (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | core/include/fxcodec/fx_codec.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 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 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_
8 #define CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ 8 #define CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 public: 428 public:
429 static CPDF_ColorSpace* GetStockCS(int Family); 429 static CPDF_ColorSpace* GetStockCS(int Family);
430 430
431 static CPDF_ColorSpace* Load(CPDF_Document* pDoc, CPDF_Object* pCSObj); 431 static CPDF_ColorSpace* Load(CPDF_Document* pDoc, CPDF_Object* pCSObj);
432 432
433 void ReleaseCS(); 433 void ReleaseCS();
434 434
435 int GetBufSize() const; 435 int GetBufSize() const;
436 FX_FLOAT* CreateBuf(); 436 FX_FLOAT* CreateBuf();
437 void GetDefaultColor(FX_FLOAT* buf) const; 437 void GetDefaultColor(FX_FLOAT* buf) const;
438 int CountComponents() const { return m_nComponents; } 438 FX_DWORD CountComponents() const { return m_nComponents; }
439 int GetFamily() const { return m_Family; } 439 int GetFamily() const { return m_Family; }
440 virtual void GetDefaultValue(int iComponent, 440 virtual void GetDefaultValue(int iComponent,
441 FX_FLOAT& value, 441 FX_FLOAT& value,
442 FX_FLOAT& min, 442 FX_FLOAT& min,
443 FX_FLOAT& max) const { 443 FX_FLOAT& max) const {
444 value = 0; 444 value = 0;
445 min = 0; 445 min = 0;
446 max = 1.0f; 446 max = 1.0f;
447 } 447 }
448 448
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 } 504 }
505 virtual FX_BOOL v_SetCMYK(FX_FLOAT* pBuf, 505 virtual FX_BOOL v_SetCMYK(FX_FLOAT* pBuf,
506 FX_FLOAT c, 506 FX_FLOAT c,
507 FX_FLOAT m, 507 FX_FLOAT m,
508 FX_FLOAT y, 508 FX_FLOAT y,
509 FX_FLOAT k) const { 509 FX_FLOAT k) const {
510 return FALSE; 510 return FALSE;
511 } 511 }
512 512
513 int m_Family; 513 int m_Family;
514 514
Tom Sepez 2016/03/10 19:42:19 nit: while we're at it, no blank line here, line 5
Wei Li 2016/03/10 20:14:41 Done.
515 int m_nComponents; 515 FX_DWORD m_nComponents;
516 516
517 CPDF_Array* m_pArray; 517 CPDF_Array* m_pArray;
518 518
519 FX_DWORD m_dwStdConversion; 519 FX_DWORD m_dwStdConversion;
520 }; 520 };
521 class CPDF_Color { 521 class CPDF_Color {
522 public: 522 public:
523 CPDF_Color() : m_pCS(NULL), m_pBuffer(NULL) {} 523 CPDF_Color() : m_pCS(NULL), m_pBuffer(NULL) {}
524 524
525 CPDF_Color(int family); 525 CPDF_Color(int family);
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 767
768 FX_BOOL m_bInterpolate; 768 FX_BOOL m_bInterpolate;
769 769
770 CPDF_Document* m_pDocument; 770 CPDF_Document* m_pDocument;
771 771
772 CPDF_Dictionary* m_pOC; 772 CPDF_Dictionary* m_pOC;
773 CPDF_Dictionary* InitJPEG(uint8_t* pData, FX_DWORD size); 773 CPDF_Dictionary* InitJPEG(uint8_t* pData, FX_DWORD size);
774 }; 774 };
775 775
776 #endif // CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_ 776 #endif // CORE_INCLUDE_FPDFAPI_FPDF_RESOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | core/include/fxcodec/fx_codec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698