Tizen 2.1 base
[platform/upstream/hplip.git] / prnt / hpijs / creator.cpp
1 /*****************************************************************************\
2   creator.cpp : Open Source Imaging Halftoner and ColorMatcher Creation
3
4   Copyright (c) 1996 - 2001, Hewlett-Packard Co.
5   All rights reserved.
6
7   Redistribution and use in source and binary forms, with or without
8   modification, are permitted provided that the following conditions
9   are met:
10   1. Redistributions of source code must retain the above copyright
11      notice, this list of conditions and the following disclaimer.
12   2. Redistributions in binary form must reproduce the above copyright
13      notice, this list of conditions and the following disclaimer in the
14      documentation and/or other materials provided with the distribution.
15   3. Neither the name of Hewlett-Packard nor the names of its
16      contributors may be used to endorse or promote products derived
17      from this software without specific prior written permission.
18
19   THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
20   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
22   NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
24   TO, PATENT INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
25   OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 \*****************************************************************************/
30
31
32 #include "header.h"
33 #include "resources.h"
34
35 #include "hptypes.h"
36 #include "colormatch.h"
37 #include "colormatcher_open.h"
38 #include "halftoner.h"
39 #include "halftoner_open.h"
40
41 APDK_BEGIN_NAMESPACE
42
43 // routine to return generic ColorMatcher to Job
44 ColorMatcher* Create_ColorMatcher
45 (
46     SystemServices* pSys,
47     ColorMap cm,
48     unsigned int DyeCount,
49     unsigned int iInputWidth
50 )
51 {
52     return new ColorMatcher_Open(pSys,cm,DyeCount,iInputWidth);
53 }
54
55 // routine to return generic Halftoner to Job
56 Halftoner* Create_Halftoner
57 (
58     SystemServices* pSys,
59     PrintMode* pPM,
60     unsigned int iInputWidth,
61     unsigned int iNumRows[],
62     unsigned int HiResFactor,
63     BOOL usematrix
64 )
65 {
66     return new Halftoner_Open(pSys,pPM,iInputWidth, iNumRows,HiResFactor,usematrix);
67 }
68
69 BYTE* GetHT3x3_4()
70 {
71     return (BYTE*)HT300x3004level_open;
72 }
73
74 BYTE* GetHT6x6_4()
75 {
76     return (BYTE*)HT600x6004level895_open;
77 }
78
79 BYTE* GetHTBinary()
80 {
81     return (BYTE*)HTBinary_open;
82 }
83
84 BYTE* GetHT6x6_4_970()
85 {
86     return (BYTE*)HT600x6004level970_open;
87 }
88 \r
89 #ifdef APDK_DJ3320
90 BYTE *GetHT12x12x1_4100_Photo_Best ()
91 {
92     return (BYTE *) HT1200x1200x1PhotoBest_open;
93 }
94 #endif // APDK_DJ3320\r
95
96 // functions to identify versions of system
97 BOOL ProprietaryImaging()
98 {
99     return FALSE;
100 }
101
102 BOOL ProprietaryScaling()
103 {
104     return FALSE;
105 }
106
107 APDK_END_NAMESPACE
108