contrib/inkscape_tools: update README.md file
authorAlexis Laferrière <alexis.laf@xymus.net>
Tue, 21 Apr 2015 10:09:24 +0000 (06:09 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Tue, 21 Apr 2015 13:38:40 +0000 (09:38 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

contrib/inkscape_tools/README.md

index 017ec86..c338656 100644 (file)
@@ -1,25 +1,28 @@
 # SVG to PNG and Nit
 
-This tool is used in combination with Inkscape to simplify assets creation for _mnit_ apps. It uses Inkscape to extract a PNG file from a SVG file. It will also create a Nit source file to create _mnit_ images for each objects with an id beginning by 0.
+This tool uses Inkscape to prepare assets for Nit applications from a single SVG file.
+It selects objects to extract from the SVG file when their id begins with `0`.
 
-# Features
+It will produce two files:
 
-* Creates a sinlge PNG file per SVG source file
-* Creates subimages for objects with an id beginning by 0.
-* If the id ends with 0 to 9, will instead create an array of subimages.
+* A Nit source file that declares a single class with an attribute for each selected object.
+  The attribute usually holds a single texture, except if the the id ends with a digit, then it will be an array.
 
-# Usage
+* A single PNG image file that contains all the selected objects.
+  With the option `--pow2`, the image size is rounded to the next of 2.
+
+## Usage
 
 1. Create a new Inkscape document.
-2. Create objects and set their ids to begin with 0
-3. Save the document (ex: to `drawing.svg`) the name of the file is important
+2. Create objects and set their ids to begin with `0`.
+3. Save the document to `drawing.svg` (for this example), the name of the file is used to name the Nit class.
 4. Execute `bin/svg_to_png_and_nit drawing.svg`
-5. From your code, import the generated source file (at  src/drawing.nit`)
+5. From your code, import the generated source file at `src/drawing.nit`.
 6. Use the class `DrawingImages` and its attributes.
 
-# Examples
+## Examples
 
-The minimal test in  tests/app/  shows the basic usage of this tool.
+The minimal test in `tests/app/` shows the basic usage of this tool.
 
 The Dino example `../../../../examples/mnit_dino` also uses this tool and is a more complete and practical example.