Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * The Original Code is Copyright (C) 2006 Blender Foundation. 00019 * All rights reserved. 00020 * 00021 * The Original Code is: all of this file. 00022 * 00023 * Contributor(s): none yet. 00024 * 00025 * ***** END GPL/BL DUAL LICENSE BLOCK ***** 00026 */ 00027 #ifndef BKE_COLORTOOLS_H 00028 #define BKE_COLORTOOLS_H 00029 00034 struct CurveMapping; 00035 struct CurveMap; 00036 struct Scopes; 00037 struct ImBuf; 00038 struct rctf; 00039 00040 #if defined _WIN32 00041 # define DO_INLINE __inline 00042 #elif defined (__sun) || defined (__sun__) 00043 # define DO_INLINE 00044 #else 00045 # define DO_INLINE static inline 00046 #endif 00047 00048 struct CurveMapping *curvemapping_add(int tot, float minx, float miny, float maxx, float maxy); 00049 void curvemapping_free(struct CurveMapping *cumap); 00050 struct CurveMapping *curvemapping_copy(struct CurveMapping *cumap); 00051 void curvemapping_set_black_white(struct CurveMapping *cumap, const float black[3], const float white[3]); 00052 00053 #define CURVEMAP_SLOPE_NEGATIVE 0 00054 #define CURVEMAP_SLOPE_POSITIVE 1 00055 void curvemap_reset(struct CurveMap *cuma, struct rctf *clipr, int preset, int slope); 00056 void curvemap_remove(struct CurveMap *cuma, int flag); 00057 void curvemap_insert(struct CurveMap *cuma, float x, float y); 00058 void curvemap_sethandle(struct CurveMap *cuma, int type); 00059 00060 void curvemapping_changed(struct CurveMapping *cumap, int rem_doubles); 00061 00062 /* single curve, no table check */ 00063 float curvemap_evaluateF(struct CurveMap *cuma, float value); 00064 /* single curve, with table check */ 00065 float curvemapping_evaluateF(struct CurveMapping *cumap, int cur, float value); 00066 void curvemapping_evaluate3F(struct CurveMapping *cumap, float vecout[3], const float vecin[3]); 00067 void curvemapping_evaluateRGBF(struct CurveMapping *cumap, float vecout[3], const float vecin[3]); 00068 void curvemapping_evaluate_premulRGBF(struct CurveMapping *cumap, float vecout[3], const float vecin[3]); 00069 void curvemapping_do_ibuf(struct CurveMapping *cumap, struct ImBuf *ibuf); 00070 void curvemapping_premultiply(struct CurveMapping *cumap, int restore); 00071 int curvemapping_RGBA_does_something(struct CurveMapping *cumap); 00072 void curvemapping_initialize(struct CurveMapping *cumap); 00073 void curvemapping_table_RGBA(struct CurveMapping *cumap, float **array, int *size); 00074 00075 void scopes_update(struct Scopes *scopes, struct ImBuf *ibuf, int use_color_management); 00076 void scopes_free(struct Scopes *scopes); 00077 void scopes_new(struct Scopes *scopes); 00078 00079 #endif 00080