1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
|
/*
* Color_Sep.h -- ePiX CMYK Color separation classes
*
* This file is part of ePiX, a C++ library for creating high-quality
* figures in LaTeX
*
* Version 1.1.17
* Last Change: September 13, 2007
*
*
* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
* Andrew D. Hwang <ahwang -at- holycross -dot- edu>
* Department of Mathematics and Computer Science
* College of the Holy Cross
* Worcester, MA, 01610-2395, USA
*
*
* ePiX is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* ePiX is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
* License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ePiX; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef EPIX_COLOR_SEP
#define EPIX_COLOR_SEP
#include <string>
#include <vector>
#include "Color_Base.h"
namespace ePiX {
class Cyan_Layer : public Color_Base {
public:
Cyan_Layer(double dens=1);
// Return Cyan channel of input
Cyan_Layer& filter(const Color_Base&);
Cyan_Layer* clone() const;
RGB_Densities to_rgb() const; // returns RGB(0,1,1)
std::string model() const;
std::string name() const;
std::vector<double> densities() const;
private:
double m_dens;
// null operations
Cyan_Layer& operator*= (double);
Cyan_Layer& blend(const Color_Base&, double);
Cyan_Layer& superpose(const Color_Base&);
Cyan_Layer& invert();
};
class Magenta_Layer : public Color_Base {
public:
Magenta_Layer(double dens=1);
// Return Magenta channel of input
Magenta_Layer& filter(const Color_Base&);
Magenta_Layer* clone() const;
RGB_Densities to_rgb() const; // returns RGB(0,1,1)
std::string model() const;
std::string name() const;
std::vector<double> densities() const;
private:
double m_dens;
// null operations
Magenta_Layer& operator*= (double);
Magenta_Layer& blend(const Color_Base&, double);
Magenta_Layer& superpose(const Color_Base&);
Magenta_Layer& invert();
};
class Yellow_Layer : public Color_Base {
public:
Yellow_Layer(double dens=1);
// Return Yellow channel of input
Yellow_Layer& filter(const Color_Base&);
Yellow_Layer* clone() const;
RGB_Densities to_rgb() const; // returns RGB(0,1,1)
std::string model() const;
std::string name() const;
std::vector<double> densities() const;
private:
double m_dens;
// null operations
Yellow_Layer& operator*= (double);
Yellow_Layer& blend(const Color_Base&, double);
Yellow_Layer& superpose(const Color_Base&);
Yellow_Layer& invert();
};
class Black_Layer : public Color_Base {
public:
Black_Layer(double dens=1);
// Return Black channel of input
Black_Layer& filter(const Color_Base&);
Black_Layer* clone() const;
RGB_Densities to_rgb() const; // returns RGB(0,1,1)
std::string model() const;
std::string name() const;
std::vector<double> densities() const;
private:
double m_dens;
// null operations
Black_Layer& operator*= (double);
Black_Layer& blend(const Color_Base&, double);
Black_Layer& superpose(const Color_Base&);
Black_Layer& invert();
};
} // end of namespace
#endif /* EPIX_COLOR_SEP */
|