Things wrong:
- indentation
- the dc callback didn't reset the dc state
(this is okay if you only use the pict
in the interactions window in drracket,
because drracket protects itself, but it
is not okay if you use them in slideshow
or something)
- the dc callback didn't use the 'dx' and 'dy'
arguments properly
(you could see this going wrong if you put
two of the picts together in an hc-append
and looked at the compound pict in the
interactions window)
Commit 18883681a2 reordered the methods. Although the convention in
the `racket/draw' manual is to order methods alphabetically,
alphabetical does look strange for `color%', and I've refined the
non-alphabetical order to one I like even more.
Also, use keywords for `make-pen' and `make-brush'.
Adding `make-pen' and `make-color' creates many conflicts among
teaching libraries, such as `2htdp/image'. These are easy to fix
up in the tree, but adding such obvious names to `racket/draw'
may create other compatibility problems, so we might have to reconsider
the names.
In consultation with Asumu.
The `get-handle' method provides the underlying Cairo surface for
a bitmap, while the unsafe `make-handle-brush' function supports the
use of a Cairo surface as a `brush%'.
Also, add `racket/draw/unsafe/cairo-lib', which simplifies access
Cairo from external libraries. Documenting `racket/draw/unsafe/cairo'
might be better, but that's a lot more work.
The default is that hiniting is enabled, which causes some text
metrics (notably width) to be rounded to integer values, which makes
spacing more consistent. This default is backward-compatible. The
non-default 'unaligned mode refrains from rounding, which makes metric
information scale correctly and improves output for PS/PDF (such as
Redex output).
The `text' function from `slideshow/pict' defaults to
disabling hinting --- which is consistent with its default to combine
text instead of drawing character-by-character -- so slides and Redex
inherit the improvement.
Treat a "face" as a font description only if it has a comma,
otherwise go back to treating it as a family name.
This change fixes the problem of parsing "Times New Roman"
as "Times New, Roman".
It's not clear that any limit is still needed, and probably
font sizes should be liberalized to reals instead of
integers (but I don't want to spend that kind of time
right now).
I originally picked "under" as the preposition to go before
a platform name, but obviously you should build "on" a
platform, and "under" suddenly annoys me. The choice of "on"
is now codified in the documentation style guide. Meanwhile,
"Unix" insted of "X" seems more clear and consistent in the
`racket/gui' docs.
More usefully, this patch also fixes a few out-of-date
platform-specific claims.
so that they conceptually apply after the current
transformation, instead of before the current transformation;
more general rotation problems were related to aligned drawing
and the calculation of the effective scale for alignment
- fail gracefully with pre 1.4 Cairo
- clip all drawing for an empty clipping region
- disallow `is-empty?' on a region without a DC
(since the test depends on the DC dimensions)