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