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) 2019-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#include "chart/common.h"
23
24#include <cairo.h>
25#include <gtk/gtk.h>
26
27void draw_no_image(cairo_t *cr, GtkWidget *widget);
28void draw_line(cairo_t *cr, point_t start, point_t end);
29void draw_cross(cairo_t *cr, point_t center);
30void draw_box(cairo_t *cr, box_t box, const float *homography);
31
32void clear_background(cairo_t *cr);
33void center_image(cairo_t *cr, image_t *image);
34void draw_image(cairo_t *cr, image_t *image);
35void draw_boundingbox(cairo_t *cr, point_t *bb);
36void draw_f_boxes(cairo_t *cr, const float *homography, chart_t *chart);
37void draw_d_boxes(cairo_t *cr, const float *homography, chart_t *chart);
38void draw_color_boxes_outline(cairo_t *cr, const float *homography, chart_t *chart);
39void draw_color_boxes_inside(cairo_t *cr, const float *homography, chart_t *chart, float shrink, float line_width,
40 gboolean colored);
41void stroke_boxes(cairo_t *cr, float line_width);
42
43void set_offset_and_scale(image_t *image, float width, float height);
44cairo_surface_t *cairo_surface_create_from_xyz_data(const float *const image, const int width, const int height);
45
46// clang-format off
47// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
48// vim: shiftwidth=2 expandtab tabstop=2 cindent
49// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
50// clang-format on
51
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:718
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
void draw_image(cairo_t *cr, image_t *image)
Definition dtcairo.c:81
void draw_color_boxes_outline(cairo_t *cr, const float *homography, chart_t *chart)
Definition dtcairo.c:123
void draw_box(cairo_t *cr, box_t box, const float *homography)
Definition dtcairo.c:49
void draw_cross(cairo_t *cr, point_t center)
Definition dtcairo.c:41
void draw_no_image(cairo_t *cr, GtkWidget *widget)
Definition dtcairo.c:22
void center_image(cairo_t *cr, image_t *image)
Definition dtcairo.c:76
void stroke_boxes(cairo_t *cr, float line_width)
Definition dtcairo.c:156
void clear_background(cairo_t *cr)
Definition dtcairo.c:70
void draw_color_boxes_inside(cairo_t *cr, const float *homography, chart_t *chart, float shrink, float line_width, gboolean colored)
Definition dtcairo.c:128
void draw_line(cairo_t *cr, point_t start, point_t end)
Definition dtcairo.c:35
cairo_surface_t * cairo_surface_create_from_xyz_data(const float *const image, const int width, const int height)
Definition dtcairo.c:184
void draw_f_boxes(cairo_t *cr, const float *homography, chart_t *chart)
Definition dtcairo.c:92
void draw_boundingbox(cairo_t *cr, point_t *bb)
Definition dtcairo.c:87
void draw_d_boxes(cairo_t *cr, const float *homography, chart_t *chart)
Definition dtcairo.c:118
void set_offset_and_scale(image_t *image, float width, float height)
Definition dtcairo.c:167
Definition colorchart.h:37
Definition colorchart.h:48
Definition src/chart/common.h:32
Definition colorchart.h:27