2023-05-31 16:19:06 +02:00
|
|
|
/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2017-12-07 05:36:26 +01:00
|
|
|
#pragma once
|
|
|
|
|
2019-02-17 22:08:12 +01:00
|
|
|
/** \file
|
|
|
|
* \ingroup bke
|
2019-02-06 23:28:21 +01:00
|
|
|
*/
|
2017-12-07 05:36:26 +01:00
|
|
|
|
2024-01-04 21:07:48 +01:00
|
|
|
struct CBData;
|
2017-12-07 05:36:26 +01:00
|
|
|
struct ColorBand;
|
|
|
|
|
2020-03-29 07:33:51 +02:00
|
|
|
/** #ColorBand.data length. */
|
2017-12-07 05:36:26 +01:00
|
|
|
#define MAXCOLORBAND 32
|
|
|
|
|
2024-01-04 21:07:48 +01:00
|
|
|
void BKE_colorband_init(ColorBand *coba, bool rangetype);
|
|
|
|
void BKE_colorband_init_from_table_rgba(ColorBand *coba,
|
2017-12-13 05:35:03 +01:00
|
|
|
const float (*array)[4],
|
2022-01-07 01:38:08 +01:00
|
|
|
int array_len,
|
2017-12-13 05:35:03 +01:00
|
|
|
bool filter_sample);
|
2024-01-04 21:07:48 +01:00
|
|
|
ColorBand *BKE_colorband_add(bool rangetype);
|
|
|
|
bool BKE_colorband_evaluate(const ColorBand *coba, float in, float out[4]);
|
|
|
|
void BKE_colorband_evaluate_table_rgba(const ColorBand *coba, float **array, int *size);
|
|
|
|
CBData *BKE_colorband_element_add(ColorBand *coba, float position);
|
|
|
|
bool BKE_colorband_element_remove(ColorBand *coba, int index);
|
|
|
|
void BKE_colorband_update_sort(ColorBand *coba);
|