Given an image composed entirely of different shapes that do not move and are grouped together, how would I convert this group into an image or similar element that has this same graphic but all together? The reason I’d like them combined is for better performance, because I assume once I get a lot of these shape-based graphics on the screen the frame rate will drop exponentially.
On a similar note: could groups with effects (such as outlines and shadows) applied to them also be merged into a flat graphic?
There is the buffered-rendering property in SVG Tiny 1.2, it provides what you are after more or less. You set
buffered-rendering="static"on the <g> element to give the browser the hint that it’s good to cache the results.Of the current generation of browsers only Opera supports this property AFAIK.
Yes, effects are included in the “flat graphic”, the end result should look exactly the same as if buffered-rendering wasn’t there.