Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
src/chart/common.h
Go to the documentation of this file.
1/*
2 * This file is part of darktable,
3 * Copyright (C) 2016 johannes hanika.
4 * Copyright (C) 2016, 2020 Tobias Ellinghaus.
5 * Copyright (C) 2020 Aurélien PIERRE.
6 * Copyright (C) 2020 Pascal Obry.
7 * Copyright (C) 2021 Sakari Kapanen.
8 * Copyright (C) 2022 Martin Bařinka.
9 *
10 * darktable is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * darktable is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with darktable. If not, see <http://www.gnu.org/licenses/>.
22 */
23
24#pragma once
25
26#include "chart/colorchart.h"
27
28enum
29{
33 BOTTOM_LEFT = 3
34};
35
36typedef struct image_t
37{
39
40 cairo_surface_t *surface;
41 cairo_pattern_t *image;
43 float *xyz;
44 float scale;
46 float shrink;
47
49
51 gboolean draw_colored;
53
54int get_homography(const point_t *source, const point_t *target, float *h);
55point_t apply_homography(point_t p, const float *h);
56// Gives a factor of scaling areas at point p
57float apply_homography_scaling(point_t p, const float *h);
58
59// clang-format off
60// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
61// vim: shiftwidth=2 expandtab tabstop=2 cindent
62// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
63// clang-format on
64
static const dt_aligned_pixel_simd_t const dt_adaptation_t const float p
Definition chromatic_adaptation.h:315
const float h
Definition colorspaces_inline_conversions.h:1366
struct _GtkWidget GtkWidget
Definition splash.h:29
point_t apply_homography(point_t p, const float *h)
Definition common.c:68
float apply_homography_scaling(point_t p, const float *h)
Definition common.c:79
int get_homography(const point_t *source, const point_t *target, float *h)
Definition common.c:27
@ BOTTOM_RIGHT
Definition src/chart/common.h:32
@ TOP_LEFT
Definition src/chart/common.h:30
@ BOTTOM_LEFT
Definition src/chart/common.h:33
@ TOP_RIGHT
Definition src/chart/common.h:31
Definition colorchart.h:53
Definition src/chart/common.h:37
GtkWidget * drawing_area
Definition src/chart/common.h:38
int height
Definition src/chart/common.h:42
int width
Definition src/chart/common.h:42
float scale
Definition src/chart/common.h:44
int offset_x
Definition src/chart/common.h:45
chart_t ** chart
Definition src/chart/common.h:50
gboolean draw_colored
Definition src/chart/common.h:51
int offset_y
Definition src/chart/common.h:45
cairo_pattern_t * image
Definition src/chart/common.h:41
cairo_surface_t * surface
Definition src/chart/common.h:40
float shrink
Definition src/chart/common.h:46
point_t bb[4]
Definition src/chart/common.h:48
float * xyz
Definition src/chart/common.h:43
Definition colorchart.h:32