Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
dtcairo.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) 2019 Andreas Schneider.
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#include "chart/common.h"
28
29#include <cairo.h>
30#include <gtk/gtk.h>
31
32void draw_no_image(cairo_t *cr, GtkWidget *widget);
33void draw_line(cairo_t *cr, point_t start, point_t end);
34void draw_cross(cairo_t *cr, point_t center);
35void draw_box(cairo_t *cr, box_t box, const float *homography);
36
37void clear_background(cairo_t *cr);
38void center_image(cairo_t *cr, image_t *image);
39void draw_image(cairo_t *cr, image_t *image);
40void draw_boundingbox(cairo_t *cr, point_t *bb);
41void draw_f_boxes(cairo_t *cr, const float *homography, chart_t *chart);
42void draw_d_boxes(cairo_t *cr, const float *homography, chart_t *chart);
43void draw_color_boxes_outline(cairo_t *cr, const float *homography, chart_t *chart);
44void draw_color_boxes_inside(cairo_t *cr, const float *homography, chart_t *chart, float shrink, float line_width,
45 gboolean colored);
46void stroke_boxes(cairo_t *cr, float line_width);
47
48void set_offset_and_scale(image_t *image, float width, float height);
49cairo_surface_t *cairo_surface_create_from_xyz_data(const float *const image, const int width, const int height);
50
51// clang-format off
52// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
53// vim: shiftwidth=2 expandtab tabstop=2 cindent
54// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
55// clang-format on
56
static void homography(float *homograph, const float angle, const float shift_v, const float shift_h, const float shear, const float f_length_kb, const float orthocorr, const float aspect, const int width, const int height, dt_iop_ashift_homodir_t dir)
Definition ashift.c:748
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
void draw_image(cairo_t *cr, image_t *image)
Definition dtcairo.c:87
void draw_color_boxes_outline(cairo_t *cr, const float *homography, chart_t *chart)
Definition dtcairo.c:129
void draw_box(cairo_t *cr, box_t box, const float *homography)
Definition dtcairo.c:55
void draw_cross(cairo_t *cr, point_t center)
Definition dtcairo.c:47
void draw_no_image(cairo_t *cr, GtkWidget *widget)
Definition dtcairo.c:28
void center_image(cairo_t *cr, image_t *image)
Definition dtcairo.c:82
void stroke_boxes(cairo_t *cr, float line_width)
Definition dtcairo.c:162
void clear_background(cairo_t *cr)
Definition dtcairo.c:76
void draw_color_boxes_inside(cairo_t *cr, const float *homography, chart_t *chart, float shrink, float line_width, gboolean colored)
Definition dtcairo.c:134
void draw_line(cairo_t *cr, point_t start, point_t end)
Definition dtcairo.c:41
cairo_surface_t * cairo_surface_create_from_xyz_data(const float *const image, const int width, const int height)
Definition dtcairo.c:190
void draw_f_boxes(cairo_t *cr, const float *homography, chart_t *chart)
Definition dtcairo.c:98
void draw_boundingbox(cairo_t *cr, point_t *bb)
Definition dtcairo.c:93
void draw_d_boxes(cairo_t *cr, const float *homography, chart_t *chart)
Definition dtcairo.c:124
void set_offset_and_scale(image_t *image, float width, float height)
Definition dtcairo.c:173
struct _GtkWidget GtkWidget
Definition splash.h:29
Definition colorchart.h:42
Definition colorchart.h:53
Definition src/chart/common.h:37
Definition colorchart.h:32