using the 1931 cmf is important to mostly match cxf spectral to xyz mapping

parent e881495e
......@@ -979,6 +979,7 @@ static void draw_items (Mrg *mrg, float w, float h)
{
cairo_t *cr = mrg_cr (mrg);
cairo_set_antialias (cr, CAIRO_ANTIALIAS_FAST);
int length = mrg_list_length (items);
cairo_new_path (cr);
cairo_rectangle (cr, 0, 0, w, h);
......@@ -997,7 +998,11 @@ static void draw_items (Mrg *mrg, float w, float h)
cairo_arc (cr, lemma->sx * h + (w - h) / 2, lemma->sy * h,
lemma->radius * h * rad_scale, 0.0, M_PI * 2);
cairo_set_source_rgb (cr, color->srgb[0], color->srgb[1], color->srgb[2]);
if (length > 100)
cairo_set_source_rgba (cr, color->srgb[0], color->srgb[1], color->srgb[2], 0.65);
else
cairo_set_source_rgb (cr, color->srgb[0], color->srgb[1], color->srgb[2]);
mrg_listen (mrg, MRG_PRESS, select_item_cb, color, NULL);
......@@ -1351,7 +1356,7 @@ int load_cxf (Luz *luz, char *path)
Coloritto *color = add_item (luz, COLORITTO_LAB, &lab[0], 0.005);
coloritto_set_name (color, colorname->str);
}
if (got_rgb)
if (got_rgb && 0)
{
Coloritto *color = add_item (luz, COLORITTO_SRGB, &srgb[0], 0.005);
coloritto_set_name (color, colorname->str);
......
......@@ -141,14 +141,14 @@ static const char *config_internal =
// default configuration:
"observer_x=observer_x_1964\n"
"observer_y=observer_y_1964\n"
"observer_z=observer_z_1964\n"
"observer_x=observer_x_1931jv\n"
"observer_y=observer_y_1931jv\n"
"observer_z=observer_z_1931jv\n"
"observer_x=observer_x_1964\n"
"observer_y=observer_y_1964\n"
"observer_z=observer_z_1964\n"
"observer_x=observer_x_1931\n"
"observer_y=observer_y_1931\n"
"observer_z=observer_z_1931\n"
......
......@@ -31,10 +31,28 @@
#include <stdint.h>
typedef struct _Luz Luz;
#define LUZ_MAX_COATS 16
#define LUZ_SPECTRUM_START 360 /* 380nm */
#if 0
#define LUZ_SPECTRUM_START 360
#define LUZ_SPECTRUM_GAP 5
#define LUZ_SPECTRUM_BANDS (835-LUZ_SPECTRUM_START)/LUZ_SPECTRUM_GAP
#endif
#if 1 // this is the spectrum the data of Holidays_test.cxf is defined over
#define LUZ_SPECTRUM_START 420
#define LUZ_SPECTRUM_GAP 5
#define LUZ_SPECTRUM_BANDS 95
#define LUZ_SPECTRUM_BANDS (700-LUZ_SPECTRUM_START)/LUZ_SPECTRUM_GAP
#endif
#if 0
#define LUZ_SPECTRUM_START 380
#define LUZ_SPECTRUM_GAP 5
#define LUZ_SPECTRUM_BANDS 70
#endif
//#define LUZ_SPECTRUM_BANDS 68 /* 380 + 10 * 31 = 790nm */
// START + GAP * BANDS should be around 700 to cover visual range
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment