summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/dimension')
-rw-r--r--libdimension/dimension/color.h4
-rw-r--r--libdimension/dimension/pigments.h14
2 files changed, 16 insertions, 2 deletions
diff --git a/libdimension/dimension/color.h b/libdimension/dimension/color.h
index 98d1530..d4e0402 100644
--- a/libdimension/dimension/color.h
+++ b/libdimension/dimension/color.h
@@ -77,6 +77,10 @@ dmnsn_color_is_black(dmnsn_color color)
/* Perceptual color manipulation */
+/** Convert from sRGB space. */
+dmnsn_color dmnsn_color_from_sRGB(dmnsn_color color);
+/** Convert to sRGB space. */
+dmnsn_color dmnsn_color_to_sRGB(dmnsn_color color);
/** Greyscale color intensity. */
double dmnsn_color_intensity(dmnsn_color color);
/** Add two colors together. */
diff --git a/libdimension/dimension/pigments.h b/libdimension/dimension/pigments.h
index 26b75f8..e62963e 100644
--- a/libdimension/dimension/pigments.h
+++ b/libdimension/dimension/pigments.h
@@ -45,13 +45,22 @@ dmnsn_pigment *dmnsn_new_canvas_pigment(dmnsn_canvas *canvas);
dmnsn_map *dmnsn_new_color_map(void);
/**
+ * pigment_map flags.
+ */
+typedef enum dmnsn_pigment_map_flags {
+ DMNSN_PIGMENT_MAP_REGULAR, /**< Calculate linear color gradients. */
+ DMNSN_PIGMENT_MAP_SRGB /**< Calculate sRGB color gradients. */
+} dmnsn_pigment_map_flags;
+
+/**
* A color-mapped pigment.
* @param[in,out] pattern The pattern of the pigment.
* @param[in,out] map The color map to apply to the pattern.
* @return A pigment mapping the pattern to color values.
*/
dmnsn_pigment *dmnsn_new_color_map_pigment(dmnsn_pattern *pattern,
- dmnsn_map *map);
+ dmnsn_map *map,
+ dmnsn_pigment_map_flags flags);
/**
* Construct a pigment map.
@@ -66,4 +75,5 @@ dmnsn_map *dmnsn_new_pigment_map(void);
* @return A pigment mapping the pattern to other pigments.
*/
dmnsn_pigment *dmnsn_new_pigment_map_pigment(dmnsn_pattern *pattern,
- dmnsn_map *map);
+ dmnsn_map *map,
+ dmnsn_pigment_map_flags flags);