Author |
Topic |
|
Adequat
Tomato Guru
182 Posts |
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Sep 14 2018 : 08:43:18 AM
|
Do you have a couple of test images I could attach to the feature request? I have just tried two different image programs on my computer, and neither offer the option to save out an image in SVG. So its this or start pulling random images out of the internet... I have concerns about where this might lead
If you do have a couple of sample images we can use, please submit the files via the form:
http://www.wholetomato.com/support/contact.asp
including this thread ID or URL in the description, so we can match it up. |
zen is the art of being at one with the two'ness |
|
|
Adequat
Tomato Guru
182 Posts |
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Sep 17 2018 : 09:13:09 AM
|
I have not come across UML in years, but yes, this is a natural fit for a vector graphics format. Thank you for the sample images, I have put in a feature request for this:
case=119335
As for using the HTML preview to preview the images, it depends on the control used, and what it supports. There are quite a lot of graphics formats, and not all programs can preview all of them. Plus we want the file viewer to be lighter weight than a full web browser. |
zen is the art of being at one with the two'ness |
|
|
Adequat
Tomato Guru
182 Posts |
Posted - Sep 17 2018 : 4:19:50 PM
|
Note that PlantUML, unlike its name suggests, has a much wider scope than UML. Lots of diagrams of different types can be easily built. |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Sep 17 2018 : 5:41:30 PM
|
I was thinking this would work well for flow diagrams, and other such types of diagram.
Have you considered writing your own SourceLinks plugin to preview SVG files? I tried wrapping the SVG file in a very simple HTML file, that simply shows the image, but this does not work in the HTML viewer SourceLinks is using. So the HTML viewer is not handling everything a full web browser does, which makes sense for a preview. But then its a question of where you draw the line for what the previewer should support... |
zen is the art of being at one with the two'ness |
|
|
Adequat
Tomato Guru
182 Posts |
Posted - Sep 19 2018 : 04:32:21 AM
|
quote: I tried wrapping the SVG file in a very simple HTML file, that simply shows the image, but this does not work in the HTML viewer SourceLinks is using
Yes, it does work. I tried it. With both cases: SVG as external file referenced by the HTML file, or inlined SVG inside a HTML page.
quote: Have you considered writing your own SourceLinks plugin to preview SVG files?
Really not have the time :(
|
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Sep 19 2018 : 07:26:04 AM
|
OK... which OS are you using? Also, which IDE and version of VA are you using?
I was testing this under Windows 7, but I have just tried it under Windows 10 as well, and the SVG image is not shown, when wrapped in HTML, on either machine for me. In case the problem is my wrapper, I am using this:
<HTML>
<IMG SRC="overall-architecture.svg"></IMG>
</HTML> in a file called "overall-architecture_wrapper.html". The same file extension and HTML works with a .PNG file, so I would expect this to work for a SVG file as well.
So it looks like this working or not depends on some extra variable. |
zen is the art of being at one with the two'ness |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Sep 19 2018 : 12:14:02 PM
|
This code works for displaying the image in a browser, but it doesn't work in the file viewer plugin:
<html>
<body>
<img src="./bitmap_vs_svg.svg" />
</body>
</html>
Maybe a security policy issue in the plugin... |
Edited by - sean on Sep 19 2018 12:18:41 PM |
|
|
Adequat
Tomato Guru
182 Posts |
Posted - Sep 20 2018 : 03:18:44 AM
|
You simply needs to declare it's a HTML5 page and it will work, simply like this:
<!DOCTYPE html>
<body>
<img src="overall-architecture.svg" />
</body>
</html>
HTML5 can preview lots of thing. This might be an idea to display even more stuff.
|
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Sep 20 2018 : 12:24:58 PM
|
Bingo! Thanks. |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Sep 20 2018 : 4:32:53 PM
|
Adding HTML to the list of languages I don't know enough about |
zen is the art of being at one with the two'ness |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Dec 03 2018 : 6:29:18 PM
|
case=119335 is implemented in build 2301 |
|
|
|
Topic |
|