Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
dev_geometry.h
Go to the documentation of this file.
1/*
2 This file is part of Ansel.
3 Copyright (C) 2026 Aurélien Pierre.
4
5 Ansel 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 Ansel 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 Ansel. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef DT_DEVELOP_DEV_GEOMETRY_H
20#define DT_DEVELOP_DEV_GEOMETRY_H
21
22#include <glib.h>
23#include <stdint.h>
24
25#include "system/atomic.h"
26
27struct dt_develop_t;
28
61
79
81void dt_dev_geometry_init(struct dt_develop_t *dev);
82
84void dt_dev_geometry_set_raw_size(struct dt_develop_t *dev, int32_t width, int32_t height,
85 gboolean valid);
86
88void dt_dev_geometry_set_processed_size(struct dt_develop_t *dev, int32_t width, int32_t height);
89
98
101
104gboolean dt_dev_geometry_get_raw_size(const struct dt_develop_t *dev, int32_t *width,
105 int32_t *height);
106
108gboolean dt_dev_geometry_get_processed_size(const struct dt_develop_t *dev, int32_t *width,
109 int32_t *height);
110
111/* Single-field readers, each a coherent read of the whole record returning one member.
112 * Use the pair getters above wherever the two are consumed as one geometric fact -- these
113 * exist for the many sites that genuinely want one number, and for a mechanical migration
114 * off the old struct members that cannot silently change what a site reads. */
115int32_t dt_dev_geometry_raw_width(const struct dt_develop_t *dev);
116int32_t dt_dev_geometry_raw_height(const struct dt_develop_t *dev);
119gboolean dt_dev_geometry_raw_inited(const struct dt_develop_t *dev);
120
121#endif // DT_DEVELOP_DEV_GEOMETRY_H
122
123// clang-format off
124// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
125// vim: shiftwidth=2 expandtab tabstop=2 cindent
126// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
127// clang-format on
const dt_colormatrix_t dt_aligned_pixel_t out
int32_t dt_dev_geometry_processed_width(const struct dt_develop_t *dev)
gboolean dt_dev_geometry_get_raw_size(const struct dt_develop_t *dev, int32_t *width, int32_t *height)
gboolean dt_dev_geometry_get_processed_size(const struct dt_develop_t *dev, int32_t *width, int32_t *height)
void dt_dev_geometry_init(struct dt_develop_t *dev)
void dt_dev_geometry_set_processed_size(struct dt_develop_t *dev, int32_t width, int32_t height)
void dt_dev_geometry_set_raw_size(struct dt_develop_t *dev, int32_t width, int32_t height, gboolean valid)
int32_t dt_dev_geometry_raw_width(const struct dt_develop_t *dev)
int32_t dt_dev_geometry_raw_height(const struct dt_develop_t *dev)
dt_dev_image_geometry_t dt_dev_geometry_snapshot(const struct dt_develop_t *dev)
int32_t dt_dev_geometry_processed_height(const struct dt_develop_t *dev)
gboolean dt_dev_geometry_raw_inited(const struct dt_develop_t *dev)
gboolean dt_dev_geometry_get(const struct dt_develop_t *dev, dt_dev_image_geometry_t *out)
uint32_t width
Definition mipmap_cache.c:0
uint32_t height
Definition mipmap_cache.c:1
Single-writer seqlock around the record.
dt_dev_image_geometry_t value
dt_atomic_uint64 generation
Objective facts about the image a dev is working on.