summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/dimension')
-rw-r--r--libdimension/dimension/map.h6
-rw-r--r--libdimension/dimension/pigments.h28
2 files changed, 13 insertions, 21 deletions
diff --git a/libdimension/dimension/map.h b/libdimension/dimension/map.h
index 80b48b6..b515518 100644
--- a/libdimension/dimension/map.h
+++ b/libdimension/dimension/map.h
@@ -20,7 +20,7 @@
/**
* @file
- * Generic maps (backend for color_maps, pigment_maps, etc.).
+ * Generic maps (backend for pigment_maps, etc.).
*/
/** A map. */
@@ -44,8 +44,8 @@ dmnsn_map *dmnsn_new_map(size_t size);
void dmnsn_delete_map(dmnsn_map *map);
/**
- * Add an entry (a scalar-object pair) to a color map.
- * @param[in,out] map The color map to add to.
+ * Add an entry (a scalar-object pair) to a map.
+ * @param[in,out] map The map to add to.
* @param[in] n The index of the entry.
* @param[in] obj The value of the entry.
*/
diff --git a/libdimension/dimension/pigments.h b/libdimension/dimension/pigments.h
index 60dc658..56bba92 100644
--- a/libdimension/dimension/pigments.h
+++ b/libdimension/dimension/pigments.h
@@ -39,13 +39,7 @@ dmnsn_pigment *dmnsn_new_solid_pigment(dmnsn_color color);
dmnsn_pigment *dmnsn_new_canvas_pigment(dmnsn_canvas *canvas);
/**
- * Construct a color map.
- * @return An empty color map.
- */
-dmnsn_map *dmnsn_new_color_map(void);
-
-/**
- * pigment_map flags.
+ * Pigment map flags.
*/
typedef enum dmnsn_pigment_map_flags {
DMNSN_PIGMENT_MAP_REGULAR, /**< Calculate linear color gradients. */
@@ -53,23 +47,21 @@ typedef enum dmnsn_pigment_map_flags {
} 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.
- * @param[in] flags Gradient flags
- * @return A pigment mapping the pattern to color values.
- */
-dmnsn_pigment *dmnsn_new_color_map_pigment(dmnsn_pattern *pattern,
- dmnsn_map *map,
- dmnsn_pigment_map_flags flags);
-
-/**
* Construct a pigment map.
* @return An empty pigment map.
*/
dmnsn_map *dmnsn_new_pigment_map(void);
/**
+ * Add a raw color to a pigment map.
+ * Shorthand for creating a solid pigment and adding it manually.
+ * @param[in,out] map The pigment map to add to.
+ * @param[in] n The index of the entry.
+ * @param[in] color The value of the entry.
+ */
+void dmnsn_pigment_map_add_color(dmnsn_map *map, double n, dmnsn_color color);
+
+/**
* A pigment-mapped pigment.
* @param[in,out] pattern The pattern of the pigment.
* @param[in,out] map The pigment map to apply to the pattern.