File talk:Chess Board.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Strategies for SVG drawing

[edit]

The versions of File:Chess board.svg show several different concepts, worth discussing.

barely resembles the appearance of a chess board. The board is a single path (requiring 12 245 bytes) with hundreds of cubic curves resulting in no straight lines. Instead of squares, round irregular structures are shown - but with a useless accuracy of seven decimal fractions.
is a chess board. The frame and the 64 rectangles are defined sequentially, with over-attributing for each one (typical of Inkscape svg files), not using any grouping strategies. The path definitions are accurate to one decimal place, but because of the Inkscape-typical transformations five digits are needed to correct the transformation aberration. Each one of the 64 squares need ~233 bytes for definition.
still has the 64 + 1 rectangles, but by clever grouping most of the repeated attributes are removed. This is a swift and effective method to reduce file size and redundancies. The transformation deviation needing the avoidable correction with five decimal digits is still in use.
 Info I was just trying to do a quick and easy simplification that would reduce the file size by over 500%, and not trying to rethink the file from scratch... AnonMoos (talk) 12:45, 31 December 2010 (UTC)[reply]
Completely new drawn using more effective methods. With only eight path-drawn rectangles, four horizontal ones overlaid by four vertical ones using the fill-rule evenodd, all is done inside the outer frame rectangle. The coordinates are specified as integers, instead of transformations, and the viewBox is used.
Angoumois
Another new concept. After defining four of the squares, they are cloned to a filling pattern for the outer frame. A similar solution can be seen in the vector file Flag of Angoumois, while LinkFA-star Aragon () is another example for filling patterns.
From this version forward, the white squares are actually filled with white; in prior versions they had been transparent.
is a revision of the 4th version from McSush. Alternate concepts resulted in larger files, e.g. the stroke-dasharray, used for November () and Checkermotoslogo (), was not the best choice.
 Info Coding as stroke-width="1" and fill="black" is default parameter value and therefore always redundant (except when overwriting another group attribute). Its removal makes a file size of 339 bytes. Sure it will be possible to find more reductions. -- 08:49, 31 December 2010 Sarang
revision of 6, removing default values and avoiding negative values
again a version with viewBox and dasharray, with Cmglee's genial idea to get the first fill with circle which needs only 16 bytes instead of 22 when coded as a path.