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-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 "chart/colorchart.h"
22
23enum
24{
28 BOTTOM_LEFT = 3
29};
30
31typedef struct image_t
32{
33 GtkWidget *drawing_area;
34
35 cairo_surface_t *surface;
36 cairo_pattern_t *image;
38 float *xyz;
39 float scale;
41 float shrink;
42
44
46 gboolean draw_colored;
48
49int get_homography(const point_t *source, const point_t *target, float *h);
50point_t apply_homography(point_t p, const float *h);
51// Gives a factor of scaling areas at point p
52float apply_homography_scaling(point_t p, const float *h);
53
54// clang-format off
55// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
56// vim: shiftwidth=2 expandtab tabstop=2 cindent
57// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
58// clang-format on
59
@ BOTTOM_RIGHT
Definition src/chart/common.h:27
@ TOP_LEFT
Definition src/chart/common.h:25
@ BOTTOM_LEFT
Definition src/chart/common.h:28
@ TOP_RIGHT
Definition src/chart/common.h:26
point_t apply_homography(point_t p, const float *h)
Definition common.c:64
float apply_homography_scaling(point_t p, const float *h)
Definition common.c:75
int get_homography(const point_t *source, const point_t *target, float *h)
Definition common.c:23
Definition colorchart.h:48
Definition src/chart/common.h:32
GtkWidget * drawing_area
Definition src/chart/common.h:33
int height
Definition src/chart/common.h:37
int width
Definition src/chart/common.h:37
float scale
Definition src/chart/common.h:39
int offset_x
Definition src/chart/common.h:40
chart_t ** chart
Definition src/chart/common.h:45
gboolean draw_colored
Definition src/chart/common.h:46
int offset_y
Definition src/chart/common.h:40
cairo_pattern_t * image
Definition src/chart/common.h:36
cairo_surface_t * surface
Definition src/chart/common.h:35
float shrink
Definition src/chart/common.h:41
point_t bb[4]
Definition src/chart/common.h:43
float * xyz
Definition src/chart/common.h:38
Definition colorchart.h:27