pylab_ml.misc.iasvg
Created on Fri Mar 4 12:00:27 2022
Create interactive widgets from an svg image.
@author: jung
- This lib is based on the following information or other libs:
https://pypi.org/project/svgelements/ for calculation from the transformation matrix
- animated svg graphics: https://funprojects.blog/2021/12/07/animated-svg-graphics-in-python/
-> principle adopted for changing text
- selectable image: https://stackoverflow.com/questions/59090988/clickable-svg-image-to-run-method
image is not adjusted to the size of the window
not applicable to items within an image, because transform from parent missing
https://forum.qt.io/topic/109025/updating-qgraphicseffect-for-qgraphicssvgitem/6
- QtWidgets.QGraphicsView
- What is available for reading, writing, manipulating from svg-files:
- svgelements https://github.com/meerk40t/svgelements -> this lib is used in this class
more robust as svg.path, include other elements like points, matrix, color
SVG manipulation within a GUI https://github.com/MoplusplusApp/Moplusplus
- svglib
only reading SVG files and converting them (to a reasonable degree) to other formats using the ReportLab Open Source toolkit.
- CairoSVG https://cairosvg.org/
convert to png, pdf, ps and svg
- svg.path
svg.path is a collection of objects that implement the different path commands in SVG, and a parser for SVG path definitions.
- drawSvg
A Python 3 library for programmatically generating SVG images (vector drawings) and rendering them or displaying them in a Jupyter notebook.
- svgutils https://svgutils.readthedocs.io/en/latest/transform.html
basic svg transformations
Todo
si units missing
min,max values for the QDoubleSpinBox
show combobox for string values
mouse bewegungen abfangen und setToolTip anzeigen
Classes
|
Interactive SVG Widget. |
|
SVG Interactive Viewer |
|
SvgItem is a QGraphicsSvgItem with some additional functions for interactivity. |