Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
masks_solid.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int dt_masks_solid_edge (struct dt_masks_form_gui_points_t *gui_points, const float *contour, int header, float cell)

Function Documentation

◆ dt_masks_solid_edge()

int dt_masks_solid_edge ( struct dt_masks_form_gui_points_t * gui_points,
const float * contour,
int header,
float cell )

The edge of the part of a stroke painted at full density, as closed loops.

The rasteriser paints every spoke solid from its spine sample to its contour sample, so the solid part is the union of the bands between neighbouring spokes. That union is filled on a grid of cell image pixels and its edge traced at half coverage.

Reads points and border_count of gui_points, and contour, index-aligned with points, their first header samples being node data. Writes fading, fading_count, fading_breaks and fading_break_count: every loop ends on its first point, and a zero-length break starts each loop but the first.

Returns
0 on success, an empty edge included; 1 when an allocation failed, nothing written.

Definition at line 649 of file masks_solid.c.

References _solid_band_signs(), _solid_count(), _solid_edges(), _solid_fill(), _solid_grid_fit(), _solid_spine(), _solid_trace(), bbox, dt_masks_form_gui_points_t::border_count, dt_alloc_align(), dt_calloc_align(), DT_DEBUG_MASKS, DT_DEBUG_PERF, dt_free_align, dt_get_debug_flags(), dt_get_wtime(), dt_print(), dt_masks_form_gui_points_t::fading_break_count, dt_masks_form_gui_points_t::fading_count, g, IS_NULL_PTR, MAX, n, dt_masks_form_gui_points_t::points, sign, SOLID_MAX_CROSSINGS, and SOLID_SUBLINES.

Referenced by _judge_fading_edge(), and dt_masks_gui_form_create().