Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
colorpicker.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2011 Robert Bieber.
4 Copyright (C) 2012 Richard Wonka.
5 Copyright (C) 2014, 2016 Tobias Ellinghaus.
6 Copyright (C) 2016 Roman Lebedev.
7 Copyright (C) 2019 Edgardo Hoszowski.
8 Copyright (C) 2019-2020 Pascal Obry.
9 Copyright (C) 2020 Diederik Ter Rahe.
10 Copyright (C) 2021 Dan Torop.
11 Copyright (C) 2021 Mark-64.
12 Copyright (C) 2021 Ralf Brown.
13 Copyright (C) 2022 Martin Baƙinka.
14 Copyright (C) 2023 Alynx Zhou.
15
16 darktable is free software: you can redistribute it and/or modify
17 it under the terms of the GNU General Public License as published by
18 the Free Software Foundation, either version 3 of the License, or
19 (at your option) any later version.
20
21 darktable is distributed in the hope that it will be useful,
22 but WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 GNU General Public License for more details.
25
26 You should have received a copy of the GNU General Public License
27 along with darktable. If not, see <http://www.gnu.org/licenses/>.
28*/
29
30#ifndef DT_LIBS_COLORPICKER_H
31#define DT_LIBS_COLORPICKER_H
32
33#include <gtk/gtk.h>
34#include <inttypes.h>
35
41
49
51
54{
56 // For the primary sample, these are the current sample area,
57 // whether from colorpicker lib or an iop. They are used for showing
58 // the sample in the center view, and sampling in the pixelpipe.
59 // Coordinates are stored canonically in normalized RAW space.
60 // Callers operating in processed/image space need to convert with
61 // dt_dev_coordinates_raw_norm_to_image_norm().
62 float point[2];
65 // NOTE: only applies to live samples
66 gboolean locked;
67
69 // picked color in display profile, as picked from preview pixelpipe
71 // picked color converted display profile -> histogram profile (currently did
72 // nothing because we dropped histogram profile)
74 // picked color converted display profile -> Lab
76 // in scope profile with current statistic
77 int label_rgb[4];
78 // in display profile with current statistic
79 GdkRGBA swatch;
80
93 char backbuf_op[32];
94
100
101#endif // DT_LIBS_COLORPICKER_H
102
103// clang-format off
104// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
105// vim: shiftwidth=2 expandtab tabstop=2 cindent
106// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
107// clang-format on
dt_lib_colorpicker_statistic_t
Definition colorpicker.h:43
@ DT_LIB_COLORPICKER_STATISTIC_MAX
Definition colorpicker.h:46
@ DT_LIB_COLORPICKER_STATISTIC_N
Definition colorpicker.h:47
@ DT_LIB_COLORPICKER_STATISTIC_MIN
Definition colorpicker.h:45
@ DT_LIB_COLORPICKER_STATISTIC_MEAN
Definition colorpicker.h:44
dt_lib_colorpicker_size_t
Definition colorpicker.h:37
@ DT_LIB_COLORPICKER_SIZE_POINT
Definition colorpicker.h:38
@ DT_LIB_COLORPICKER_SIZE_BOX
Definition colorpicker.h:39
dt_aligned_pixel_t lib_colorpicker_sample_statistics[DT_LIB_COLORPICKER_STATISTIC_N]
Definition colorpicker.h:50
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
Definition colorspaces.h:98
float dt_boundingbox_t[4]
Definition image.h:83
DT_ALIGNED_PIXEL float dt_aligned_pixel_t[4]
Definition simd.h:53
lib_colorpicker_sample_statistics display
Definition colorpicker.h:70
dt_lib_colorpicker_size_t size
Definition colorpicker.h:64
lib_colorpicker_sample_statistics scope
Definition colorpicker.h:73
char backbuf_op[32]
Global histogram stage backing this live sample.
Definition colorpicker.h:93
dt_boundingbox_t box
Definition colorpicker.h:63
lib_colorpicker_sample_statistics lab
Definition colorpicker.h:75