... | ... | @@ -834,7 +834,7 @@ Creates a mesh from ```shape``` using the marching cubes algorithm. Before calcu |
|
|
|
|
|
### From assets <a name="assets"></a>
|
|
|
|
|
|
```svg_ex(file,dpi)```
|
|
|
```svg_contouring(file,dpi)```
|
|
|
|
|
|
Extracts contours out of a SVG file. Returns a table of ```SVGContour``` objects.
|
|
|
* ```file```: input svg file
|
... | ... | @@ -852,7 +852,7 @@ The ```SVGContour``` object has the following members: |
|
|
<td>
|
|
|
|
|
|
```lua
|
|
|
svg_shapes = svg_ex('restroom.svg',90)
|
|
|
svg_shapes = svg_contouring('restroom.svg',90)
|
|
|
for i,contour in pairs(svg_shapes) do
|
|
|
if contour:hasFill() then
|
|
|
set_brush_color(i, contour:fill()[1], contour:fill()[2], contour:fill()[3])
|
... | ... | @@ -873,7 +873,7 @@ end |
|
|
Creates a font object based on the font described in the TrueType Font file ```ttf```.
|
|
|
* ```ttf```: TrueType Font file
|
|
|
The interface to the font object is the following:
|
|
|
* ```str(string, tracking)``` : Returns a 3D geometry of the string ```string```. If present, the font's [kerning](https://en.wikipedia.org/wiki/Kerning) information is added to ```tracking``` [tracking](https://en.wikipedia.org/wiki/Letter-spacing tracking).
|
|
|
* ```str(string, tracking)``` : Returns a 3D geometry of the string ```string```. If present, the font's [kerning](https://en.wikipedia.org/wiki/Kerning) information is added to ```tracking``` [tracking](https://en.wikipedia.org/wiki/Letter-spacing).
|
|
|
|
|
|
<table>
|
|
|
<tr>
|
... | ... | |