00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef GIMP_PRINT_INTERNAL_COLOR_H
00034 #define GIMP_PRINT_INTERNAL_COLOR_H
00035
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039
00040
00041 #include <gimp-print/color.h>
00042
00043 #if 0
00044 typedef enum
00045 {
00046 STP_OUTPUT_TYPE_INVALID,
00047 STP_OUTPUT_TYPE_GRAYSCALE,
00048 STP_OUTPUT_TYPE_WHITESCALE,
00049 STP_OUTPUT_TYPE_RGB,
00050 STP_OUTPUT_TYPE_CMY,
00051 STP_OUTPUT_TYPE_CMYK,
00052 STP_OUTPUT_TYPE_CMYKRB,
00053 STP_OUTPUT_TYPE_RAW
00054 } stp_output_type_t;
00055 #endif
00056
00057 typedef struct
00058 {
00059 int (*init)(stp_vars_t v, stp_image_t *image, size_t steps);
00060 int (*get_row)(stp_vars_t v, stp_image_t *image,
00061 int row, unsigned *zero_mask);
00062 stp_parameter_list_t (*list_parameters)(stp_const_vars_t v);
00063 void (*describe_parameter)(stp_const_vars_t v, const char *name,
00064 stp_parameter_t *description);
00065 } stpi_colorfuncs_t;
00066
00067
00068 #define COOKIE_COLOR 0x05d892e2
00069
00070 typedef struct stpi_internal_color
00071 {
00072 int cookie;
00073 const char *short_name;
00074 const char *long_name;
00075 const stpi_colorfuncs_t *colorfuncs;
00076 } stpi_internal_color_t;
00077
00078
00079
00080
00081
00082
00083 extern int stpi_color_init(stp_vars_t v, stp_image_t *image, size_t steps);
00084
00085
00086
00087
00088
00089 extern int stpi_color_get_row(stp_vars_t v, stp_image_t *image,
00090 int row, unsigned *zero_mask);
00091
00092 extern stp_parameter_list_t stpi_color_list_parameters(stp_const_vars_t v);
00093
00094 extern void stpi_color_describe_parameter(stp_const_vars_t v, const char *name,
00095 stp_parameter_t *description);
00096
00097 extern void stpi_channel_reset(stp_vars_t v);
00098 extern void stpi_channel_reset_channel(stp_vars_t v, int channel);
00099
00100 extern void stpi_channel_add(stp_vars_t v, unsigned channel,
00101 unsigned subchannel, double value);
00102
00103 extern void stpi_channel_set_density_adjustment(stp_vars_t v,
00104 int color, int subchannel,
00105 double adjustment);
00106 extern void stpi_channel_set_ink_limit(stp_vars_t v, double limit);
00107 extern void stpi_channel_set_cutoff_adjustment(stp_vars_t v,
00108 int color, int subchannel,
00109 double adjustment);
00110 extern void stpi_channel_set_black_channel(stp_vars_t v, int channel);
00111
00112 extern void stpi_channel_initialize(stp_vars_t v, stp_image_t *image,
00113 int input_channel_count);
00114
00115 extern void stpi_channel_convert(stp_const_vars_t v, unsigned *zero_mask);
00116
00117 extern unsigned short * stpi_channel_get_input(stp_const_vars_t v);
00118
00119 extern unsigned short * stpi_channel_get_output(stp_const_vars_t v);
00120
00121
00122
00123 extern stp_const_color_t
00124 stpi_get_color_by_colorfuncs(stpi_colorfuncs_t *colorfuncs);
00125
00126 extern int
00127 stpi_color_register(const stpi_internal_color_t *color);
00128
00129 extern int
00130 stpi_color_unregister(const stpi_internal_color_t *color);
00131
00132 #ifdef __cplusplus
00133 }
00134 #endif
00135
00136 #endif