call hue_saturation_calculate_transfers() here...

2008-01-23  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimphuesaturationconfig.[ch]
	(gimp_hue_saturation_config_to_cruft): call
	hue_saturation_calculate_transfers() here...

	* app/tools/gimphuesaturationtool.c (gimp_hue_saturation_tool_map):
	...instead of here.


svn path=/trunk/; revision=24693
This commit is contained in:
Michael Natterer 2008-01-23 16:51:33 +00:00 committed by Michael Natterer
parent 17e0ee4192
commit df24e66869
4 changed files with 18 additions and 9 deletions

View File

@ -1,3 +1,12 @@
2008-01-23 Michael Natterer <mitch@gimp.org>
* app/gegl/gimphuesaturationconfig.[ch]
(gimp_hue_saturation_config_to_cruft): call
hue_saturation_calculate_transfers() here...
* app/tools/gimphuesaturationtool.c (gimp_hue_saturation_tool_map):
...instead of here.
2008-01-23 Michael Natterer <mitch@gimp.org>
* app/gegl/gimplevelsconfig.[ch]: to_levels_cruft() -> to_cruft().

View File

@ -222,19 +222,21 @@ gimp_hue_saturation_config_reset_range (GimpHueSaturationConfig *config,
void
gimp_hue_saturation_config_to_cruft (GimpHueSaturationConfig *config,
HueSaturation *hs)
HueSaturation *cruft)
{
GimpHueRange range;
g_return_if_fail (GIMP_IS_HUE_SATURATION_CONFIG (config));
g_return_if_fail (hs != NULL);
g_return_if_fail (cruft != NULL);
for (range = GIMP_ALL_HUES; range <= GIMP_MAGENTA_HUES; range++)
{
hs->hue[range] = config->hue[range] * 180;
hs->saturation[range] = config->saturation[range] * 100;
hs->lightness[range] = config->lightness[range] * 100;
cruft->hue[range] = config->hue[range] * 180;
cruft->saturation[range] = config->saturation[range] * 100;
cruft->lightness[range] = config->lightness[range] * 100;
}
hs->overlap = config->overlap * 100;
cruft->overlap = config->overlap * 100;
hue_saturation_calculate_transfers (cruft);
}

View File

@ -60,7 +60,7 @@ void gimp_hue_saturation_config_reset_range (GimpHueSaturationConfig *config,
/* temp cruft */
void gimp_hue_saturation_config_to_cruft (GimpHueSaturationConfig *config,
HueSaturation *hs);
HueSaturation *cruft);
#endif /* __GIMP_HUE_SATURATION_CONFIG_H__ */

View File

@ -210,8 +210,6 @@ gimp_hue_saturation_tool_map (GimpImageMapTool *image_map_tool)
GimpHueSaturationTool *hs_tool = GIMP_HUE_SATURATION_TOOL (image_map_tool);
gimp_hue_saturation_config_to_cruft (hs_tool->config, hs_tool->hue_saturation);
hue_saturation_calculate_transfers (hs_tool->hue_saturation);
}