27 Drawing Contracts
This page documents the contracts that are used to describe the specification of racket/draw objects and functions.
Recognizes font designations. Corresponds to the family
initialization argument of the font% class.
Equivalent to the following definition:
(or/c 'default 'decorative 'roman 'script 'swiss 'modern 'symbol 'system)
Recognizes font styles. Corresponds to the style
initialization argument of the font% class.
Equivalent to the following definition:
(or/c 'normal 'italic 'slant)
Recognizes font weights. Corresponds to the weight
initialization argument of the font% class.
Equivalent to the following definition:
(or/c (integer-in 100 1000) 'thin 'ultralight 'light 'semilight 'book 'normal 'medium 'semibold 'bold 'ultrabold 'heavy 'ultraheavy)
修改于package draw-lib的1.14版本:Changed to allow integer values and the symbols 'thin, 'ultralight, 'semilight, 'book, 'medium, 'semibold, 'ultrabold, 'heavy, and 'ultraheavy.
Recognizes a font smoothing amount.
Corresponds to the smoothing
initialization argument of the font% class.
Equivalent to the following definition:
(or/c 'default 'partly-smoothed 'smoothed 'unsmoothed)
Recognizes font hinting modes. Corresponds to the hinting
initialization argument of the font% class.
Equivalent to the following definition:
(or/c 'aligned 'unaligned)
Recognizes pen styles. Corresponds
to the style initialization argument of the
pen% class.
Equivalent to the following definition:
(or/c 'transparent 'solid 'xor 'hilite 'dot 'long-dash 'short-dash 'dot-dash 'xor-dot 'xor-long-dash 'xor-short-dash 'xor-dot-dash)
Recognizes pen cap styles. Corresponds
to the cap initialization argument of the
pen% class.
Equivalent to the following definition:
(or/c 'round 'projecting 'butt)
Recognizes pen join styles. Corresponds
to the join initialization argument of the
pen% class.
Equivalent to the following definition:
(or/c 'round 'bevel 'miter)
Recognizes brush styles. Corresponds
to the style initialization argument of the
brush% class.
Equivalent to the following definition:
(or/c 'transparent 'solid 'opaque 'xor 'hilite 'panel 'bdiagonal-hatch 'crossdiag-hatch 'fdiagonal-hatch 'cross-hatch 'horizontal-hatch 'vertical-hatch)