]>
Commit | Line | Data |
---|---|---|
ac884b6a | 1 | // |
503b54c9 | 2 | // Color profile class for the CUPS PPD Compiler. |
ac884b6a | 3 | // |
503b54c9 MS |
4 | // Copyright 2007-2009 by Apple Inc. |
5 | // Copyright 2002-2005 by Easy Software Products. | |
ac884b6a | 6 | // |
503b54c9 MS |
7 | // These coded instructions, statements, and computer programs are the |
8 | // property of Apple Inc. and are protected by Federal copyright | |
9 | // law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
10 | // which should have been included with this file. If this file is | |
11 | // file is missing or damaged, see the license at "http://www.cups.org/". | |
ac884b6a MS |
12 | // |
13 | ||
14 | // | |
15 | // Include necessary headers... | |
16 | // | |
17 | ||
38e73f87 | 18 | #include "ppdc-private.h" |
ac884b6a MS |
19 | |
20 | ||
21 | // | |
22 | // 'ppdcProfile::ppdcProfile()' - Create a color profile. | |
23 | // | |
24 | ||
25 | ppdcProfile::ppdcProfile(const char *r, // I - Resolution name | |
26 | const char *m, // I - Media type name | |
27 | float d, // I - Density | |
28 | float g, // I - Gamma | |
29 | const float *p) // I - 3x3 transform matrix | |
94da7e34 | 30 | : ppdcShared() |
ac884b6a | 31 | { |
94da7e34 MS |
32 | PPDC_NEW; |
33 | ||
ac884b6a MS |
34 | resolution = new ppdcString(r); |
35 | media_type = new ppdcString(m); | |
36 | density = d; | |
37 | gamma = g; | |
38 | ||
39 | memcpy(profile, p, sizeof(profile)); | |
40 | } | |
41 | ||
42 | ||
43 | // | |
44 | // 'ppdcProfile::~ppdcProfile()' - Destroy a color profile. | |
45 | // | |
46 | ||
47 | ppdcProfile::~ppdcProfile() | |
48 | { | |
94da7e34 MS |
49 | PPDC_DELETE; |
50 | ||
ac884b6a MS |
51 | resolution->release(); |
52 | media_type->release(); | |
53 | } |