summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension/pigments.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-05-28 18:05:05 -0600
committerTavian Barnes <tavianator@gmail.com>2011-05-28 18:05:05 -0600
commitefd3c1c2b42ffda0c8f7e5cd9b03fba07eead1ea (patch)
treec522f2bafe5def3eb68a79005c049e130ef76b24 /libdimension/dimension/pigments.h
parent1bf306d4d93cc21c220a3f31835023e49e84dd2d (diff)
downloaddimension-efd3c1c2b42ffda0c8f7e5cd9b03fba07eead1ea.tar.xz
Handle sRGB gamma correctly.
Diffstat (limited to 'libdimension/dimension/pigments.h')
-rw-r--r--libdimension/dimension/pigments.h14
1 files changed, 12 insertions, 2 deletions
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);