diagrams/diagrams-lib — pull request #70 by byorgey (2012-12-30 02:40:06+00:00)
Title: do scaling on a Path before constructing PathLike in 'rect' (fixes #43)

We used to have

```
rect w h = unitSquare # scaleX w # scaleY h
```

since `unitSquare` can produce any `PathLike`. The new code
instead uses `(unitSquare # scaleX w # scaleY h)` to specifically
produce a `Path`, which is then deconstructed and passed into
`pathLike` to create any `PathLike`.

The difference is that while scaling by zero works fine for
`Path` it does not work very well for, say, `Diagram`s (leading to
NaNs or worse). This way, we force the scaling to happen on a
`Path`, where we know it will behave properly, and then use the
resulting geometry to construct an arbitrary `PathLike`.