3 ms·
What if I want to use html+css+js to dynamically draw a 1024x1024 picture of a cat with pixel level detail? I'm sure it can be done. But wow. That code would be
by crimsonalucard 11y ago
What if I want to use html+css+js to dynamically draw a 1024x1024 picture of a cat with pixel level detail? I'm sure it can be done. But wow. That code would be ugly.
Or how about dynamically drawing a diagonal line or swirl across the page?
I apologize for the lack of an example, but I'm sure you can imagine how much harder that would be in html and css then it is with a renderer that has bezier curves and lines as primitives.
- founderling 11y agoWhat if I want to use html+css+js to dynamically draw a 1024x1024 picture of a cat Here is your cat: http://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg http://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscri... a renderer that has bezier curves and lines SVG is part of the HTML standard and has those. And much more: http://www.google.com/search?q=svg+examples http://www.google.com/search?q=svg+examples
- crimsonalucard 11y agoI said pixel level. That's vector level. Also by html+css+javascript I thought you meant strictly primitives within that domain like spans and divs. While svg is part of html5 people typically don't think of svg when someone says to write something in html+css+javascript. Either way, well played, sir.
- spyder 11y ago🐈 🐱 You can use the canvas API for pixel level drawing, I'm not sure what's your problem with that: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Drawing_shapes https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/...
- crimsonalucard 11y agoI don't have a problem with that. Never said I did. The OP said html+css+javascript, which I assume means html primitives like div and span with css and javascript sprinkled all over it. Canvas and svg exist a little bit outside of that ecosystem and I assumed the OP wasn't referring to that, because sure... with WebGL you can literally program anything into the browser. If someone used webGL as an example it would sort of render his question pointless.