Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
colorchart.h
Go to the documentation of this file.
1/*
2 * This file is part of darktable,
3 * Copyright (C) 2016-2020 darktable developers.
4 *
5 * darktable is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * darktable is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with darktable. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#pragma once
20
21#include "common/colorspaces.h"
23
24#include <glib.h>
25
26typedef struct point_t
27{
28 float x, y;
30
31typedef struct f_line_t
32{
35
36typedef struct box_t
37{
38 // position
40 float w, h;
41 // color
43 dt_aligned_pixel_t color; // either XYZ or Lab, depending on color_space
44 dt_aligned_pixel_t rgb; // color converted to sRGB for rough displaying of patches
46
47typedef struct chart_t
48{
49 // the F marks
50 GList *f_list;
51 // the two kinds of boxen
52 GHashTable *d_table, *box_table;
53 // the box sets. the data is as follows:
54 // a hash table with a human readable name as key. the values are GList* with the names of patches.
55 // use those to lookup box_table
56 GHashTable *patch_sets;
57 // the bounding box
58 float bb_w, bb_h;
59 // other data from the CHT file
62
63
64void free_chart(chart_t *chart);
65chart_t *parse_cht(const char *filename);
66int parse_it8(const char *filename, chart_t *chart);
68
69
70// clang-format off
71// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
72// vim: shiftwidth=2 expandtab tabstop=2 cindent
73// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
74// clang-format on
75
struct point_t point_t
chart_t * parse_cht(const char *filename)
Definition colorchart.c:144
void free_chart(chart_t *chart)
Definition colorchart.c:40
int parse_it8(const char *filename, chart_t *chart)
Definition colorchart.c:514
void checker_set_color(box_t *box, dt_colorspaces_color_profile_type_t color_space, float c0, float c1, float c2)
Definition colorchart.c:102
dt_colorspaces_color_profile_type_t
Definition colorspaces.h:61
dt_colorspaces_color_profile_type_t color_space
Definition mipmap_cache.c:5
Definition colorchart.h:37
float h
Definition colorchart.h:40
float w
Definition colorchart.h:40
dt_colorspaces_color_profile_type_t color_space
Definition colorchart.h:42
dt_aligned_pixel_t color
Definition colorchart.h:43
dt_aligned_pixel_t rgb
Definition colorchart.h:44
point_t p
Definition colorchart.h:39
Definition colorchart.h:48
float bb_w
Definition colorchart.h:58
GHashTable * patch_sets
Definition colorchart.h:56
float bb_h
Definition colorchart.h:58
float box_shrink
Definition colorchart.h:60
GHashTable * box_table
Definition colorchart.h:52
GHashTable * d_table
Definition colorchart.h:52
float ref_rotation
Definition colorchart.h:60
GList * f_list
Definition colorchart.h:50
Definition colorchart.h:32
point_t p[4]
Definition colorchart.h:33
Definition colorchart.h:27
float y
Definition colorchart.h:28
float x
Definition colorchart.h:28
#define c2
#define c1