]> git.ipfire.org Git - thirdparty/cups.git/blame - ppdc/ppdc-profile.cxx
License change: Apache License, Version 2.0.
[thirdparty/cups.git] / ppdc / ppdc-profile.cxx
CommitLineData
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//
e3101897 7// Licensed under Apache License v2.0. See the file "LICENSE" for more information.
ac884b6a
MS
8//
9
10//
11// Include necessary headers...
12//
13
38e73f87 14#include "ppdc-private.h"
ac884b6a
MS
15
16
17//
18// 'ppdcProfile::ppdcProfile()' - Create a color profile.
19//
20
21ppdcProfile::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
94da7e34 26 : ppdcShared()
ac884b6a 27{
94da7e34
MS
28 PPDC_NEW;
29
ac884b6a
MS
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
43ppdcProfile::~ppdcProfile()
44{
94da7e34
MS
45 PPDC_DELETE;
46
ac884b6a
MS
47 resolution->release();
48 media_type->release();
49}