Module
svg_renderer
SVG rendering logic.
Parse and build a manipulable SVG object. Then allow to render them to rasterized image. This rely on different C library and thus on the ffi_cdef module.
Info:
- edit Alexis BRENON alexis.brenon@imag.fr
Data Types
keyboard_arrow_up-
svg_object
A manipulable SVG object.
Fields:-
string
base_document
Path to the SVG source file -
integer
width
Dimen of the SVG file -
integer
height
Dimen of the SVG file -
table
components
List of SVG components (string or placeholder) -
table
placeholders
Placeholders indexed by their sensor ID
-
string
Public Methods
keyboard_arrow_up-
convert_SVG2Tensor ( svg )
Convert an SVG object to a Torch tensor.
Parameters:-
svg_object
svg
The svg_object to convert
-
torch.FloatTensor
A torch.FloatTensor of size
depth x width x height
-
svg_object
-
prepare_svg_data ( svg_path )
Instanciate an SVG object.
Build an SVG object from an SVG file.
Parameters:-
string
svg_path
Path the SVG file to parse
- svg_object The resulting svg_object
-
string