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#ifndef DT_APPS_ANSEL_CHART_DTCAIRO_H
25#define DT_APPS_ANSEL_CHART_DTCAIRO_H
26
29
30#include <cairo.h>
31#include <gtk/gtk.h>
32
33void draw_no_image(cairo_t *cr, GtkWidget *widget);
34void draw_line(cairo_t *cr, point_t start, point_t end);
35void draw_cross(cairo_t *cr, point_t center);
36void draw_box(cairo_t *cr, box_t box, const float *homography);
37
38void clear_background(cairo_t *cr);
39void center_image(cairo_t *cr, image_t *image);
40void draw_image(cairo_t *cr, image_t *image);
41void draw_boundingbox(cairo_t *cr, point_t *bb);
42void draw_f_boxes(cairo_t *cr, const float *homography, chart_t *chart);
43void draw_d_boxes(cairo_t *cr, const float *homography, chart_t *chart);
44void draw_color_boxes_outline(cairo_t *cr, const float *homography, chart_t *chart);
45void draw_color_boxes_inside(cairo_t *cr, const float *homography, chart_t *chart, float shrink, float line_width,
46 gboolean colored);
47void stroke_boxes(cairo_t *cr, float line_width);
48
49void set_offset_and_scale(image_t *image, float width, float height);
50cairo_surface_t *cairo_surface_create_from_xyz_data(const float *const image, const int width, const int height);
51
52#endif // DT_APPS_ANSEL_CHART_DTCAIRO_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
static __DT_CLONE_TARGETS__ 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:763
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
Definition colorspaces.h:98
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
uint32_t width
Definition mipmap_cache.c:0
uint32_t height
Definition mipmap_cache.c:1