1 //
2 // Color profile class for the CUPS PPD Compiler.
3 //
4 // Copyright 2007-2009 by Apple Inc.
5 // Copyright 2002-2005 by Easy Software Products.
6 //
7 // Licensed under Apache License v2.0. See the file "LICENSE" for more information.
8 //
9
10 //
11 // Include necessary headers...
12 //
13
14 #include "ppdc-private.h"
15
16
17 //
18 // 'ppdcProfile::ppdcProfile()' - Create a color profile.
19 //
20
ppdcProfile(const char * r,const char * m,float d,float g,const float * p)21 ppdcProfile::ppdcProfile(const char *r, // I - Resolution name
22 const char *m, // I - Media type name
23 float d, // I - Density
24 float g, // I - Gamma
25 const float *p) // I - 3x3 transform matrix
26 : ppdcShared()
27 {
28 PPDC_NEW;
29
30 resolution = new ppdcString(r);
31 media_type = new ppdcString(m);
32 density = d;
33 gamma = g;
34
35 memcpy(profile, p, sizeof(profile));
36 }
37
38
39 //
40 // 'ppdcProfile::~ppdcProfile()' - Destroy a color profile.
41 //
42
~ppdcProfile()43 ppdcProfile::~ppdcProfile()
44 {
45 PPDC_DELETE;
46
47 resolution->release();
48 media_type->release();
49 }
50