▼ |  | The Racket Drawing Toolkit

1 | Overview
2 | bitmap%
3 | bitmap-dc%
4 | brush%
5 | brush-list%
6 | color%
7 | color-database<%>
8 | dc<%>
9 | dc-path%
10 | font%
11 | font-list%
12 | font-name-directory<%>
13 | gl-config%
14 | gl-context<%>
15 | linear-gradient%
16 | pdf-dc%
17 | pen%
18 | pen-list%
19 | point%
20 | post-script-dc%
21 | ps-setup%
22 | radial-gradient%
23 | record-dc%
24 | region%
25 | svg-dc%
26 | Drawing Functions
27 | Drawing Contracts
28 | Signature and Unit
29 | Unsafe Libraries
30 | Drawing Conveniences
31 | Platform Dependencies
| Bibliography
| Index

On this page:

font-family/ c
font-style/ c
font-weight/ c
font-smoothing/ c
font-hinting/ c
pen-style/ c
pen-cap-style/ c
pen-join-style/ c
brush-style/ c

top ← prev up next →

### 27`` Drawing Contracts

This page documents the contracts that are used to describe the specification of racket/draw objects and functions.

> > value

> > font-family/c : flat-contract?

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)

> > value

> > font-style/c : flat-contract?

Recognizes font styles. Corresponds to the style initialization argument of the font% class.

Equivalent to the following definition:

> (or/c 'normal 'italic 'slant)

> > value

> > font-weight/c : flat-contract?

Recognizes font weights. Corresponds to the weight initialization argument of the font% class.

Equivalent to the following definition:

> (or/c 'normal 'bold 'light)

> > value

> > font-smoothing/c : flat-contract?

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)

> > value

> > font-hinting/c : flat-contract?

Recognizes font hinting modes. Corresponds to the hinting initialization argument of the font% class.

Equivalent to the following definition:

> (or/c 'aligned 'unaligned)

> > value

> > pen-style/c : flat-contract?

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)

> > value

> > pen-cap-style/c : flat-contract?

Recognizes pen cap styles. Corresponds to the cap initialization argument of the pen% class.

Equivalent to the following definition:

> (or/c 'round 'projecting 'butt)

> > value

> > pen-join-style/c : flat-contract?

Recognizes pen join styles. Corresponds to the join initialization argument of the pen% class.

Equivalent to the following definition:

> (or/c 'round 'bevel 'miter)

> > value

> > brush-style/c : flat-contract?

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)

top ← prev up next →