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

Side by Side Diff: xfa/fxgraphics/cfx_color.cpp

Issue 1810563002: Move xfa/include/fxgraphics/fx_graphics.h to xfa/fxgraphics. (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 | « xfa/fxgraphics/cfx_color.h ('k') | xfa/fxgraphics/cfx_graphics.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #include "xfa/fxgraphics/cfx_color.h"
8
9 CFX_Color::CFX_Color() : m_type(FX_COLOR_None) {}
10
11 CFX_Color::CFX_Color(const FX_ARGB argb) {
12 Set(argb);
13 }
14
15 CFX_Color::CFX_Color(CFX_Pattern* pattern, const FX_ARGB argb) {
16 Set(pattern, argb);
17 }
18
19 CFX_Color::CFX_Color(CFX_Shading* shading) {
20 Set(shading);
21 }
22
23 CFX_Color::~CFX_Color() {
24 m_type = FX_COLOR_None;
25 }
26
27 FX_ERR CFX_Color::Set(const FX_ARGB argb) {
28 m_type = FX_COLOR_Solid;
29 m_info.argb = argb;
30 m_info.pattern = nullptr;
31 return FX_ERR_Succeeded;
32 }
33
34 FX_ERR CFX_Color::Set(CFX_Pattern* pattern, const FX_ARGB argb) {
35 if (!pattern)
36 return FX_ERR_Parameter_Invalid;
37 m_type = FX_COLOR_Pattern;
38 m_info.argb = argb;
39 m_info.pattern = pattern;
40 return FX_ERR_Succeeded;
41 }
42
43 FX_ERR CFX_Color::Set(CFX_Shading* shading) {
44 if (!shading)
45 return FX_ERR_Parameter_Invalid;
46 m_type = FX_COLOR_Shading;
47 m_shading = shading;
48 return FX_ERR_Succeeded;
49 }
OLDNEW
« no previous file with comments | « xfa/fxgraphics/cfx_color.h ('k') | xfa/fxgraphics/cfx_graphics.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698