Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
dt_geometry_vtable_t Struct Reference

A module's geometry, evaluated. Pure functions of the record's own data. More...

#include <geometry.h>

+ Collaboration diagram for dt_geometry_vtable_t:

Data Fields

void(* map_size )(const void *data, const dt_iop_roi_t *const in, dt_iop_roi_t *out)
 Full-resolution input rect -> output rect. Mirrors modify_roi_out() at scale 1.
 
int(* transform )(const void *data, const struct dt_geometry_record_t *const record, struct dt_geometry_chain_t *chain, float *points, size_t points_count)
 Image coordinates in -> image coordinates out, in place, points_count pairs. ctx composes the sub-chain upstream of this record, for the one module that needs it (liquify's warps live in RAW coordinates). NULL for every other module.
 
int(* backtransform )(const void *data, const struct dt_geometry_record_t *const record, struct dt_geometry_chain_t *chain, float *points, size_t points_count)
 The inverse of transform.
 

Detailed Description

A module's geometry, evaluated. Pure functions of the record's own data.

Every entry may be NULL, which means "identity for this operation": a module that resizes but does not move points (demosaic's downsample) has a map_size and no transform, and a module that is only ever asked for its dimensions (graduatednd) has neither.

These evaluators are the SAME code the module's own distort_transform()/modify_roi_out() run on the pixel pipe – one shared static helper per module, called from both sides. That rule is not stylistic: two derivations of the same geometry drift, and the drift shows up as an overlay that no longer sits on the thing it describes, months later, on one image.

Definition at line 74 of file geometry.h.

Field Documentation

◆ backtransform

int(* dt_geometry_vtable_t::backtransform) (const void *data, const struct dt_geometry_record_t *const record, struct dt_geometry_chain_t *chain, float *points, size_t points_count)

The inverse of transform.

Definition at line 86 of file geometry.h.

Referenced by dt_geometry_backtransform().

◆ map_size

void(* dt_geometry_vtable_t::map_size) (const void *data, const dt_iop_roi_t *const in, dt_iop_roi_t *out)

Full-resolution input rect -> output rect. Mirrors modify_roi_out() at scale 1.

Definition at line 77 of file geometry.h.

Referenced by _fold_sizes().

◆ transform

int(* dt_geometry_vtable_t::transform) (const void *data, const struct dt_geometry_record_t *const record, struct dt_geometry_chain_t *chain, float *points, size_t points_count)

Image coordinates in -> image coordinates out, in place, points_count pairs. ctx composes the sub-chain upstream of this record, for the one module that needs it (liquify's warps live in RAW coordinates). NULL for every other module.

Definition at line 82 of file geometry.h.

Referenced by _compose_forward(), and dt_geometry_module_transform().


The documentation for this struct was generated from the following file: