mirror of
https://github.com/visioncortex/vtracer.git
synced 2026-08-31 01:15:57 -07:00
Hide the spline fine-tuning flags from CLI help
--corner-threshold, --segment-length, and --splice-threshold are still accepted but no longer listed, and their -c/-l/-s short forms are gone: the defaults serve virtually every conversion, and --simplify supersedes them as the knob that actually moves output size (sweeping segment length 3.5..=10 shifts the sample photo by 25% alone but under 2% once simplify is on). README options block synced with the new help text.
This commit is contained in:
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
* `color_mode` is replaced by `clustering` (`color-cluster` | `bw` | `watershed`) across the CLI (`--clustering`), Rust (`Config::clustering`, enum `Clustering`), Python, and Node — the field selects the region-forming algorithm, not a color space.
|
* `color_mode` is replaced by `clustering` (`color-cluster` | `bw` | `watershed`) across the CLI (`--clustering`), Rust (`Config::clustering`, enum `Clustering`), Python, and Node — the field selects the region-forming algorithm, not a color space.
|
||||||
|
* The spline fine-tuning flags `--corner-threshold`, `--segment-length`, and `--splice-threshold` are hidden from CLI help (still accepted) and their short forms `-c`/`-l`/`-s` are removed — the defaults serve virtually every conversion, and `--simplify` supersedes them as the knob that actually moves output size.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|||||||
@@ -86,9 +86,6 @@ Options:
|
|||||||
-f, --filter-speckle <FILTER_SPECKLE> Discard patches smaller than X px in size (0..=128)
|
-f, --filter-speckle <FILTER_SPECKLE> Discard patches smaller than X px in size (0..=128)
|
||||||
-p, --color-precision <COLOR_PRECISION> Significant bits per RGB channel (1..=8)
|
-p, --color-precision <COLOR_PRECISION> Significant bits per RGB channel (1..=8)
|
||||||
-g, --gradient-step <GRADIENT_STEP> Color difference between gradient layers (0..=255)
|
-g, --gradient-step <GRADIENT_STEP> Color difference between gradient layers (0..=255)
|
||||||
-c, --corner-threshold <CORNER_THRESHOLD> Minimum momentary angle (degrees) to be a corner (0..=180)
|
|
||||||
-l, --segment-length <SEGMENT_LENGTH> Subdivide until all segments are shorter than this (3.5..=10)
|
|
||||||
-s, --splice-threshold <SPLICE_THRESHOLD> Minimum angle displacement (degrees) to splice a spline (0..=180)
|
|
||||||
--simplify <TOLERANCE> Simplify curves: fewest cubics within this tolerance in px (try 1–2.5)
|
--simplify <TOLERANCE> Simplify curves: fewest cubics within this tolerance in px (try 1–2.5)
|
||||||
--path-precision <PATH_PRECISION> Decimal places to use in path coordinates
|
--path-precision <PATH_PRECISION> Decimal places to use in path coordinates
|
||||||
--palette <PALETTE> Fixed palette: comma-separated hex colors, e.g. '#112233,#445566'
|
--palette <PALETTE> Fixed palette: comma-separated hex colors, e.g. '#112233,#445566'
|
||||||
@@ -104,6 +101,12 @@ Options:
|
|||||||
-V, --version Print version
|
-V, --version Print version
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The spline fine-tuning flags `--corner-threshold <0..=180>`,
|
||||||
|
`--segment-length <3.5..=10>`, and `--splice-threshold <0..=180>` are still
|
||||||
|
accepted but hidden from `--help`: their defaults (60 / 4 / 45) serve
|
||||||
|
virtually every conversion, and `--simplify` is the knob that actually moves
|
||||||
|
output size and smoothness.
|
||||||
|
|
||||||
### New in 1.0
|
### New in 1.0
|
||||||
|
|
||||||
- **Positional arguments** — `vtracer in.png out.svg`.
|
- **Positional arguments** — `vtracer in.png out.svg`.
|
||||||
|
|||||||
@@ -60,19 +60,27 @@ struct Args {
|
|||||||
gradient_step: Option<i64>,
|
gradient_step: Option<i64>,
|
||||||
|
|
||||||
/// Minimum momentary angle (degrees) to be a corner (0..=180).
|
/// Minimum momentary angle (degrees) to be a corner (0..=180).
|
||||||
#[arg(short = 'c', long, value_parser = clap::value_parser!(i64).range(0..=180))]
|
///
|
||||||
|
/// Hidden from help: a fine-tuning knob few conversions need — the
|
||||||
|
/// default (60) serves; `--simplify` is the knob worth reaching for.
|
||||||
|
#[arg(long, hide = true, value_parser = clap::value_parser!(i64).range(0..=180))]
|
||||||
corner_threshold: Option<i64>,
|
corner_threshold: Option<i64>,
|
||||||
|
|
||||||
/// Subdivide until all segments are shorter than this length (3.5..=10).
|
/// Subdivide until all segments are shorter than this length (3.5..=10).
|
||||||
#[arg(short = 'l', long, value_parser = parse_segment_length)]
|
///
|
||||||
|
/// Hidden from help: with `--simplify` reducing anchors by an explicit
|
||||||
|
/// error tolerance, this legacy knob's effect on output is negligible.
|
||||||
|
#[arg(long, hide = true, value_parser = parse_segment_length)]
|
||||||
segment_length: Option<f64>,
|
segment_length: Option<f64>,
|
||||||
|
|
||||||
/// Minimum angle displacement (degrees) to splice a spline (0..=180).
|
/// Minimum angle displacement (degrees) to splice a spline (0..=180).
|
||||||
#[arg(short = 's', long, value_parser = clap::value_parser!(i64).range(0..=180))]
|
///
|
||||||
|
/// Hidden from help: a fine-tuning knob few conversions need — the
|
||||||
|
/// default (45) serves; `--simplify` is the knob worth reaching for.
|
||||||
|
#[arg(long, hide = true, value_parser = clap::value_parser!(i64).range(0..=180))]
|
||||||
splice_threshold: Option<i64>,
|
splice_threshold: Option<i64>,
|
||||||
|
|
||||||
/// Simplify curves (spline mode): re-fit with the fewest cubics staying
|
/// Simplify curves: fewest cubics within this tolerance in px (try 1-2.5).
|
||||||
/// within this tolerance in px (try 1–2.5; paper.js uses 2.5).
|
|
||||||
#[arg(long, value_name = "TOLERANCE", value_parser = parse_simplify_tolerance)]
|
#[arg(long, value_name = "TOLERANCE", value_parser = parse_simplify_tolerance)]
|
||||||
simplify: Option<f64>,
|
simplify: Option<f64>,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user