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