Posts

Showing posts with the label svg

How do I change this fill gradient from bottom to top

How do I change this fill gradient from bottom to top <svg width="100" height="50" version="1.1" xmlns="http://www.w3.org/2000/svg"> <style type="text/css"> rect{fill:url(#MyGradient)} </style> <defs> <linearGradient id="MyGradient"> <stop offset="5%" stop-color="#F60" /> <stop offset="95%" stop-color="#FF6" /> </linearGradient> </defs> <rect width="100" height="50"> </svg> I want #F60 to be the bottom and #FF6 to be the top and i dont want to rotate it .. I never worked with svg but, can't you just switch the 'stop' lines? – M. Gara Jul 1 at 5:38 ...

Storage of multiple (~10000) SVG fill patterns

Storage of multiple (~10000) SVG fill patterns I am converting a web service from plain HTML/ASP.NET to D3/ASP.NET. I need about 10000 different constant fill patterns with about 50 different ones (from the 10000) on a single web page depending on user requests. With HTML, all these patterns were small 20x20px png files in a directory and were only loaded by filename when requested by the page. With D3, I could make a huge 'defs' file with 10000 SVG 'patterns' but it would require to be loaded every time. Any suggestions on how to store these patterns efficiently ? Thanks. Jacques Are the groups of 50 patterns logically grouped, so they could be put in separate files? Or are they ad-hoc so you don't know ahead of time which will be required? – SteveR Jun 30 at 14:07 generate the pattern on dem...