From d5c7fdd2ae90ac3531e9891bff4825a14e3cf3e6 Mon Sep 17 00:00:00 2001
From: Mira Grudzinska <67589014+mgrudzinska@users.noreply.github.com>
Date: Tue, 31 Aug 2021 15:15:03 +0200
Subject: [PATCH] docs: minor linguistic changes (#759)
---
README.md | 26 +++++++++++++++-----------
inc/thorvg.h | 8 ++++----
2 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/README.md b/README.md
index b37d261..0cce4fd 100644
--- a/README.md
+++ b/README.md
@@ -170,7 +170,7 @@ ThorVG supports SVG (Scalable Vector Graphics) rendering through its SVG interpr
to keep it lightweight, so it's useful for the embedded systems. Among the SVG Tiny specs, unsupported features in the ThorVG are the following:
- Animation
- - Fonts & Text
+ - Fonts & Text
- Interactivity
- Multimedia
- Scripting
@@ -264,20 +264,29 @@ ThorVG provides the resource verification tool for the ThorVG Engine. [ThorVG vi
### SVG to PNG
ThorVG provides an executable `svg2png` converter that generates a PNG file from an SVG file.
-To use `svg2png`, you must turn on this feature in the build option:
+To use the `svg2png`, you must turn on this feature in the build option:
```
meson -Dtools=svg2png . build
```
Alternatively, you can add the `svg2png` value to the `tools` option in `meson_option.txt`. The build output will be located in `{builddir}/src/bin/svg2png/`.
+
+
+To use the `svg2png` converter you have to pass the `SVG files` parameter. It can be a file name with the `.svg` extension or a directory name. Multiple files or directories separated by a space are also accepted. If a directory is passed, the `.svg` file extension is searched inside it and in all of its subdirectories.
+
+Optionally, the image resolution can be provided in the `WxH` format (two numbers separated by an `x` sign) following the `-r` flag.
+
+The background color can be set with the `-b` flag. The `bgColor` parameter should be passed as a three-bytes hexadecimal value in the `ffffff` format. The default background is transparent.
+
+Both flags, if provided, are applied to all of the `.svg` files.
-Examples of the usage of the `svg2png`:
+The usage examples of the `svg2png`:
```
Usage:
- svg2png [svgFileName] [-r resolution] [-b bgColor]
+ svg2png [SVG files] [-r resolution] [-b bgColor]
Flags:
- -r set output image resolution.
- -b set output image background color.
+ -r set the output image resolution.
+ -b set the output image background color.
Examples:
$ svg2png input.svg
@@ -286,11 +295,6 @@ Examples:
$ svg2png input1.svg input2.svg -r 200x200 -b ff00ff
$ svg2png . -r 200x200
```
-Multiple files or directories are accepted for `svgFileName`. If a directory is applied, subdirectories are also searched. Looking for `.svg` file extension.
-
-Background color `bgColor` is three-bytes hexadecimal color value. Hash character can be skipped (both `#ffffff` and `ffffff` are accepted). Default background is transparent.
-
-
[Back to contents](#contents)
diff --git a/inc/thorvg.h b/inc/thorvg.h
index 7afe228..eee73c8 100644
--- a/inc/thorvg.h
+++ b/inc/thorvg.h
@@ -756,7 +756,7 @@ public:
*
* The current point value is set to the last point from the sub-path.
* For each command from the @p cmds array, an appropriate number of points in @p pts array should be specified.
- * If the number of points array is different from the number required by commands array, the shape with this path added is not displayed on the screen.
+ * If the number of points in the @p pts array is different than the number required by the @p cmds array, the shape with this sub-path will not be displayed on the screen.
*
* @param[in] cmds The array of the commands in the sub-path.
* @param[in] cmdCnt The number of the sub-path's commands.
@@ -1375,11 +1375,11 @@ public:
~Saver();
/**
- * @brief Export the given @p paint data to the given @p path
+ * @brief Exports the given @p paint data to the given @p path
*
- * If the saver module supports any compression mechanism, it will optmize the data size.
+ * If the saver module supports any compression mechanism, it will optimize the data size.
* This might affect the encoding/decoding time slow down in cases, You can turn off the compression
- * if your system whole focuse on the speed.
+ * if your system whole focus on the speed.
*
* @param[in] paint The paint to be saved with all its associated properties.
* @param[in] path A path to the file, in which the paint data is to be saved.
--
2.7.4