User talk:Axenicely

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
— Preceding unsigned comment added by Axenicely (talk • contribs) 15:40, 05 September 2016 (UTC) [reply]
Welcome to Wikimedia Commons, Axenicely!

-- Wikimedia Commons Welcome (talk) 01:06, 22 December 2015 (UTC)[reply]

[edit]

Hi, you should draw your figures better as SVG files than as PNG. They are really easy to draw by hand. Do you need help? sarang사랑 06:58, 5 September 2016 (UTC)[reply]

@Sarang: : It's funny you should mention SVG. I've written code that draws a Slitherlink puzzle of any size -- optionally initialized with lines and/or X's and and/or circles around selected points -- and allows the user to solve the puzzle, alerts when the puzzle is solved, and displays the solution to the puzzle upon Ctrl-click. All this happens in an SVG file that can be dropped into any webpage, including, I thought, the Wikipedia Slitherlink page. That's the idea I had for the puzzle at the top of that page, and for the two little puzzles I created for the "Rules for puzzles that have only 1 solution" section. I thought it would be fun and instructive to allow the reader to interact with the illustrations. But, alas, Wikipedia doesn't allow SVG's containing javascript. As a fallback, I stripped the javascript out of the drawn puzzle, and set up the CSS so that the solution would show when the mouse passed over the puzzle. That file uploaded, but no image displayed. At this point, all I could do was upload the SVG without the CSS (:hover), and since (in this context) there would be little difference between a flat SVG and any other image format, I decided to upload my image as a revision to the image that was already on the page, which required that it be converted to PNG.

And here's another problem with SVG's that you may know about... I'd like to add an image to the "An even number of ends in a closed region" section of the Slitherlink page. If I do, the image again will probably not be an SVG, but rather a PNG that was converted from an SVG created by my code. The problem is the numbers. It's preferable that they look like the numbers in the other illustrations. The <text> tag can be used with a similar font, but then the numbers will not be centered vertically in all browsers. Neither alignment-baseline nor dominant-baseline works with IE or Edge. For that reason, to distribute an SVG, the paths of the four numbers must be in the file, and I'm limited to (free) fonts that can be found on the web.

So, that's my SVG story, Sarang. For me, the real disappointment is that Wikipedia doesn't allow javascript in SVG's. That could be incredibly useful. Without it, I really don't see much difference between SVG and the other formats. The scalability is nice, but not so useful in a Wikipedia page.

Thanks for your message. --Axenicely (talk) 15:26, 5 September 2016 (UTC)[reply]

Hi Axenicely, you got really a lot of experience when you tried to upload your versions! I do not know about SVG containing Java, may be it is because of security that it's not allowed - code can be harmful. As far as I know animated SVG is now working there, but that's another thing. The problems with fonts are well known, sometimes it is surprising where our renderer positions the letters... Nevertheless I saw that your drawings would be easy to draw with a text editor (or "by hand" as we call it also), and instead of giving it a quick try to draw one of them I thought it a better idea to ask you. Now I know about your troubles and wish you better future experiences with uploading files. sarang사랑 17:27, 5 September 2016 (UTC)[reply]

Hi. The renderer ignores any <style> tags, which don't have the type="text/css" attribute. You can read about this and other quirks on the SVG Help page. TilmannR (talk) 08:19, 15 December 2018 (UTC)[reply]