setting pattern color

It is probably too late, but I sent the following comment to
svg-comments@w3.org:

SVG cannot set fill color independently of the fill pattern.
This feature is desirable.

The following example is supplied with IBM's SVG viewer:

<pattern id="mypattern" x="0" y="0" width="30" height="30">
  <rect width="30" height="30" style="fill:yellow" />
  <path style="fill:none;stroke:blue" d="M0,0 L 30,30 M0,30 L 30,0"/>
</pattern>

In the above example, the pattern has a built-in background color
of yellow and foreground color of blue.

The foreground and background colors ought not be built-in to the
pattern. It should be possible to use the same pattern in any
foreground and background color.

In many drawing programs you have a set of predefined color-
independent patterns. Shapes can be filled with one of those
predefined patterns. The user can also set a foreground and
background color independently of the pattern. The shape will
first be filled with the background color and then the pattern
will be drawn over it in the foreground color.

The functionality described above is very common because in
Microsoft Windows API, the color the pattern is drawn in can be
set using SetTextColor(patternColor) and SetBkColor(backgrndColor).

It is not possible to export such drawings to SVG unless the SVG
export driver first scans the drawing and finds out all combinations
of patterns and colors and then creates an SVG pattern for each
combination of pattern and background and foreground color.

This is very tedious.

There should be a way to specify a pattern independently of the
background and foreground colors the pattern will be drawn in.

Rajeev

rajeev1998@yahoo.com

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

Received on Monday, 6 September 1999 19:07:20 UTC