Skip to content
This repository has been archived by the owner on Oct 30, 2021. It is now read-only.

Commit

Permalink
Rename --transform-precision to --transforms-precision.
Browse files Browse the repository at this point in the history
  • Loading branch information
RazrFalcon committed Jun 5, 2017
1 parent 29bc1d8 commit e07d1a7
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- `--apply-transform-to-paths`.
- `--allow-bigger-file`.
- `--coordinates-precision`.
- `--transform-precision`.
- `--transforms-precision`.
- `--properties-precision`.
- Better groups with transforms ungrouping.
- `--remove-text-attributes` removes `line-height` and `xml:space` now.
Expand Down
2 changes: 1 addition & 1 deletion data/help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Output:
--simplify-transforms <FLAG> Simplify transform matrices [default: yes]
--coordinates-precision <NUM> Set coordinates numeric precision (1..12) [default: 6]
--properties-precision <NUM> Set properties numeric precision (1..12) [default: 6]
--transform-precision <NUM> Set transform values numeric precision (1..12) [default: 8]
--transforms-precision <NUM> Set transform values numeric precision (1..12) [default: 8]
--paths-coordinates-precision <NUM> Set path's coordinates numeric precision (1..12) [default: 8]
--indent <INDENT> Set XML nodes indent [values: none, 0, 1, 2, 3, 4, tabs] [default: none]

Expand Down
2 changes: 1 addition & 1 deletion docs/src/order.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ trim-colors.rst
simplify-transforms.rst
coordinates-precision.rst
properties-precision.rst
transform-precision.rst
transforms-precision.rst
paths-coordinates-precision.rst
indent.rst
-- Other
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub enum Key {
SimplifyTransforms,
CoordinatesPrecision,
PropertiesPrecision,
TransformPrecision,
TransformsPrecision,
PathsCoordinatesPrecision,
Indent,

Expand Down Expand Up @@ -162,7 +162,7 @@ pub static KEYS: &'static KeysData<'static> = &KeysData(&[
"simplify-transforms",
"coordinates-precision",
"properties-precision",
"transform-precision",
"transforms-precision",
"paths-coordinates-precision",
"indent",

Expand Down Expand Up @@ -281,7 +281,7 @@ pub fn prepare_app<'a, 'b>() -> App<'a, 'b> {
.arg(gen_flag!(Key::SimplifyTransforms, "true"))
.arg(gen_precision!(Key::CoordinatesPrecision, "6"))
.arg(gen_precision!(Key::PropertiesPrecision, "6"))
.arg(gen_precision!(Key::TransformPrecision, "8"))
.arg(gen_precision!(Key::TransformsPrecision, "8"))
.arg(gen_precision!(Key::PathsCoordinatesPrecision, "8"))
.arg(Arg::with_name(KEYS[Key::Indent])
.long(KEYS[Key::Indent])
Expand Down Expand Up @@ -520,7 +520,7 @@ pub fn gen_cleaning_options(args: &ArgMatches) -> Options {
opt.properties_precision = value_t!(args, KEYS[Key::PropertiesPrecision], u8).unwrap();
opt.paths_coordinates_precision
= value_t!(args, KEYS[Key::PathsCoordinatesPrecision], u8).unwrap();
opt.transform_precision = value_t!(args, KEYS[Key::TransformPrecision], u8).unwrap();
opt.transforms_precision = value_t!(args, KEYS[Key::TransformsPrecision], u8).unwrap();

opt
}
Expand Down
4 changes: 2 additions & 2 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub struct Options {
// 1..12
pub paths_coordinates_precision: u8,
// 1..12
pub transform_precision: u8,
pub transforms_precision: u8,
}

// Should all be 'false'.
Expand Down Expand Up @@ -116,7 +116,7 @@ impl Default for Options {
coordinates_precision: 6,
properties_precision: 6,
paths_coordinates_precision: 8,
transform_precision: 8,
transforms_precision: 8,
}
}
}
2 changes: 1 addition & 1 deletion src/task/round_numbers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub fn round_numbers(doc: &Document, options: &Options) {
let coord_precision = options.coordinates_precision as usize;
let prop_precision = options.properties_precision as usize;
let paths_precision = options.paths_coordinates_precision as usize;
let ts_precision = options.transform_precision as usize;
let ts_precision = options.transforms_precision as usize;

for node in doc.descendants().svg() {
let mut attrs = node.attributes_mut();
Expand Down

0 comments on commit e07d1a7

Please sign in to comment.