Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 49 additions & 2 deletions data/darktableconfig.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<dttab name="darkroom" title="darkroom">
<section title="general"/>
<section name="modules" title="modules"/>
<section name="masking" title="masking"/>
</dttab>
<dttab name="processing" title="processing">
<section name="general" title="image processing"/>
Expand Down Expand Up @@ -1571,13 +1572,59 @@
<shortdescription>smoothing of brush strokes</shortdescription>
<longdescription>sets level for smoothing of brush strokes.\nstronger smoothing leads to less nodes and easier editing but with lower control of accuracy.</longdescription>
</dtconfig>
<dtconfig prefs="darkroom" section="general">
<dtconfig prefs="darkroom" section="masking">
<name>masks_scroll_down_increases</name>
<type>bool</type>
<default>false</default>
<shortdescription>scroll down to increase mask parameters</shortdescription>
<longdescription>when using the mouse scroll wheel to change mask parameters, scroll down to increase the mask size, feather size, opacity, brush hardness and gradient curvature\nby default scrolling up increases these parameters</longdescription>
</dtconfig>
<dtconfig prefs="darkroom" section="masking">
<name>masks/path_resize_amount</name>
<type>int</type>
<default>2</default>
<shortdescription>path mask resize step amount</shortdescription>
<longdescription>amount to grow or shrink a path mask per scroll wheel tick when resizing. the unit is set by the 'path mask resize unit' preference.</longdescription>
</dtconfig>
<dtconfig prefs="darkroom" section="masking">
<name>masks/path_resize_unit</name>
<type>
<enum>
<option>pixels</option>
<option>% of path size</option>
</enum>
</type>
<default>pixels</default>
<shortdescription>unit for path mask resize step amount</shortdescription>
<longdescription>unit for the path mask resize step: 'pixels' uses image pixels, '% of path size' uses a percentage of the path's largest bounding box dimension.</longdescription>
</dtconfig>
<dtconfig prefs="darkroom" section="masking">
<name>masks/path_resize_resolution</name>
<type>
<enum>
<option>512</option>
<option>1024</option>
<option>2048</option>
<option>4096</option>
</enum>
</type>
<default>2048</default>
<shortdescription>path mask resize tracing resolution</shortdescription>
<longdescription>internal raster resolution (in pixels on the longest side) used when re-vectorizing a resized path mask. higher values preserve more detail and nodes at the cost of speed.</longdescription>
</dtconfig>
<dtconfig prefs="darkroom" section="masking">
<name>masks/path_resize_curve_smoothing</name>
<type>
<enum>
<option>sharp</option>
<option>balanced</option>
<option>smooth</option>
</enum>
</type>
<default>balanced</default>
<shortdescription>path mask resize curve smoothing</shortdescription>
<longdescription>controls how corners are handled when re-vectorizing a resized path mask. 'sharp' preserves more nodes and corners; 'smooth' produces fewer, rounder control points.</longdescription>
</dtconfig>
<dtconfig prefs="darkroom" section="general">
<name>darkroom/mouse/middle_button_cycle_zoom_to_200_percent</name>
<type>bool</type>
Expand Down Expand Up @@ -4097,7 +4144,7 @@
<shortdescription>show right-side buttons in processing module headers</shortdescription>
<longdescription>when the mouse is not over a module, the multi-instance, reset and preset buttons can be hidden:\n - 'always': always show all buttons,\n - 'active': only show the buttons when the mouse is over the module,\n - 'dim': buttons are dimmed when mouse is away,\n - 'auto': hide the buttons when the panel is narrow,\n - 'fade': fade out all buttons when panel narrows,\n - 'fit': hide all the buttons if the module name doesn't fit,\n - 'smooth': fade out all buttons in one header simultaneously,\n - 'glide': gradually hide individual buttons as needed</longdescription>
</dtconfig>
<dtconfig prefs="darkroom" section="modules">
<dtconfig prefs="darkroom" section="masking">
<name>darkroom/ui/show_mask_indicator</name>
<type>bool</type>
<default>true</default>
Expand Down
15 changes: 15 additions & 0 deletions src/develop/masks.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,21 @@ typedef struct dt_masks_functions_t
int *count,
float *min,
float *max);
// grow/shrink (outset/inset) a shape to a signed absolute amount in the given
// unit (use_percent: TRUE = % of shape size, FALSE = image pixels), measured
// from a baseline captured the first time the shape is resized. Positive grows,
// negative shrinks, 0 restores the baseline. Results are cached per offset, so
// re-requesting a value is lossless. Returns TRUE if a usable shape resulted.
// Currently only implemented by path masks.
gboolean (*resize)(struct dt_masks_form_t *const form,
const int amount,
const gboolean use_percent);
// report the resize offset currently applied to the shape, in the requested
// unit, so a UI control can mirror it. Returns FALSE (amount 0) if no resize is
// active. Currently only implemented by path masks.
gboolean (*resize_get)(struct dt_masks_form_t *const form,
const gboolean use_percent,
float *amount);
void (*duplicate_points)(dt_develop_t *const dev,
struct dt_masks_form_t *base,
struct dt_masks_form_t *dest);
Expand Down
Loading
Loading