You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flipping the block in the GUI should not flip the block's picture #75
I was searching for solutions but I haven't found an easy way to do the svg flip in Qt. I consider using another Python library to do the svg transformations.
I've put a temporary solution to avoid the flipping of the images in blocks.
I think that instead of using the "/tmp" folder we can try to implement a ram disk in the future or setting the rendering of the block in the block class and modifying it only by some actions...
Thank you very much Roberto. I was thinking about doing the same thing, however using something more pythonic. I've come across svgutils python package, which could prove useful. However, it only works with files and I am trying to get a simple pull request into its mainline that could work with the xml loaded as a string so there would be no need to save it as a tmpfile (btel/svg_utils#129).
Svgutils package has a scale method which can flip the image. It is also much more simple and doesn't require inkscape to run.
Activity
robertobucher commentedon Apr 20, 2024
You're right! I have to check the last commit: it increase the quality of the graphic but with this problem.
I'll check it ASAP
zdebanos commentedon Apr 20, 2024
Thank you for your answer. I may look into it as well when I have time. I just put it here to not forget about it.
zdebanos commentedon Apr 22, 2024
I was searching for solutions but I haven't found an easy way to do the svg flip in Qt. I consider using another Python library to do the svg transformations.
robertobucher commentedon Apr 30, 2024
I've put a temporary solution to avoid the flipping of the images in blocks.
I think that instead of using the "/tmp" folder we can try to implement a ram disk in the future or setting the rendering of the block in the block class and modifying it only by some actions...
zdebanos commentedon May 2, 2024
Thank you very much Roberto. I was thinking about doing the same thing, however using something more pythonic. I've come across svgutils python package, which could prove useful. However, it only works with files and I am trying to get a simple pull request into its mainline that could work with the xml loaded as a string so there would be no need to save it as a tmpfile (btel/svg_utils#129).
Svgutils package has a scale method which can flip the image. It is also much more simple and doesn't require inkscape to run.
robertobucher commentedon May 2, 2024
I haven't found how to use svg_utils (no examples...), but this is of course a better solution as using "inkscape"!
Let me know when you find how to use this package!
robertobucher commentedon May 3, 2024
Please consider that we have to work usually with packages available in distros, and avoid when possible to have to many gits.