]> git.ipfire.org Git - thirdparty/cups.git/blame - ppdc/ppdc-profile.cxx
Import CUPS v1.7.1
[thirdparty/cups.git] / ppdc / ppdc-profile.cxx
CommitLineData
ac884b6a 1//
61515785 2// "$Id: ppdc-profile.cxx 1378 2009-04-08 03:17:45Z msweet $"
ac884b6a
MS
3//
4// Color profile class for the CUPS PPD Compiler.
5//
94da7e34 6// Copyright 2007-2009 by Apple Inc.
ac884b6a
MS
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
38e73f87 25#include "ppdc-private.h"
ac884b6a
MS
26
27
28//
29// 'ppdcProfile::ppdcProfile()' - Create a color profile.
30//
31
32ppdcProfile::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
94da7e34 37 : ppdcShared()
ac884b6a 38{
94da7e34
MS
39 PPDC_NEW;
40
ac884b6a
MS
41 resolution = new ppdcString(r);
42 media_type = new ppdcString(m);
43 density = d;
44 gamma = g;
45
46 memcpy(profile, p, sizeof(profile));
47}
48
49
50//
51// 'ppdcProfile::~ppdcProfile()' - Destroy a color profile.
52//
53
54ppdcProfile::~ppdcProfile()
55{
94da7e34
MS
56 PPDC_DELETE;
57
ac884b6a
MS
58 resolution->release();
59 media_type->release();
60}
61
62
63//
61515785 64// End of "$Id: ppdc-profile.cxx 1378 2009-04-08 03:17:45Z msweet $".
ac884b6a 65//