On this page:
font-family/  c
font-style/  c
font-weight/  c
font-smoothing/  c
font-hinting/  c
font-feature-settings/  c
pen-style/  c
pen-cap-style/  c
pen-join-style/  c
brush-style/  c

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.

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 font OpenType feature settings. Corresponds to the feature-settings initialization argument of the font% class.

Equivalent to the following definition:
(and/c hash-equal?
       hash-strong?
       (hash/c (and/c string? #px"^[ !#-~]{4}$")
               exact-nonnegative-integer?
               #:immutable #t))

Added in version 1.19 of package draw-lib.

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)