image
(above d1 d2 ...): drawing?

  d: drawing?

Creates a new drawing formed by places the drawing d1, d2, …, above each other (vertically in descending order).

(above/align align d1 d2 ...): drawing?

  align: string?, either "left", "middle", or "right"
  d: drawing?

Creates a new drawing formed by places the drawing d1, d2, …, above each other on the y-axis, aligning them along the x-axis according to align.

(beside d1 d2 ...): drawing?

  d: drawing?

Creates a new drawing formed by places the drawing d1, d2, …, beside each other (horizontally).

(beside/align align d1 d2 ...): drawing?

  align: string?, either "top", "center", or "bottom"
  d: drawing?

Creates a new drawing formed by places the drawing d1, d2, …, beside each other on the x-axis, aligning them along the y-axis according to align.

(circle radius fill color): drawing?

  radius: number?
  fill: string?, either "solid" or "outline"
  color: string?, either a color name or the form "rgba(r, g, b, a)"

Returns a drawing consisting of a circle of radius radius.

(color r b g a): string?

  r: integer?, 0 <= r <= 255
  b: integer?, 0 <= b <= 255
  g: integer?, 0 <= g <= 255
  a: integer?, 0 <= a <= 1

Returns a string of the form "rgba(r, g, b, a)" appropriate for use as a color.

(square width fill color): drawing?

  width: number?
  fill: string?, either "solid" or "outline"
  color: string?, either a color name or the form "rgba(r, g, b, a)"

Returns a drawing consisting of a square with length width.

(ellipse width height fill color): drawing?

  width: integer?
  height: integer?
  fill: boolean?
  color: string?

Returns a new drawing containing an ellipse with dimensions width × height.

(image? v): boolean?

  v: any

Returns #t if and only v is an image.

(overlay d1 d2 ...): drawing?

  d: drawing?

Creates a new drawing formed by places the drawing d1, d2, …, on top of each other. (d1 is the topmost drawing).

(overlay/align xAlign yAlign d1 d2 ...): drawing?

  xAlign: string?, either "left", "middle", or "right"
  yAlign: string?, either "top", "center", or "bottom"
  d: drawing?

Creates a new drawing formed by places the drawing d1, d2, …, on top of each other, aligning them according to xAlign and yAlign.

(overlay/offset dx dy d1 d2): drawing?

  dx: number?
  dy: number?
  d1: drawing?
  d2: drawing?

Creates a new drawing formed by places the drawing d1 on top of d2, offset by (dx, dy).

(path width height points fill color): drawing?

  width: number?
  height: number?
  points: list?, a list of points, pairs of numbers
  fill: string?, either "solid" or "outline"
  color: string?, either a color name or the form "rgba(r, g, b, a)"

Returns a drawing with dimensions width × height formed by connecting the points in points with straight lines. The points are specified as a pair of coordinates.

(rectangle width height fill color): drawing?

  width: number?
  height: number?
  fill: string?, either "solid" or "outline"
  color: string?, either a color name or the form "rgba(r, g, b, a)"

Returns a drawing consisting of a rectangle with dimensions width × height.

(rotate angle d): drawing?

  angle: number?, in degrees
  d: drawing?

Returns a new drawing formed by rotating drawing d by angle degrees around the center of its bounding box. Note: currently buggy and shifts off-center.

(triangle length fill color): drawing?

  length: number?
  fill: string?, either "solid" or "outline"
  color: string?, either a color name or the form "rgba(r, g, b, a)"

Returns a drawing consisting of a equilateral triangle with length length.

(with-dashes dash-spec d): drawing?

  dash-spec: list?, a list of numbers
  d: drawing?

Returns a new drawing formed by drawing d but with dashes specified by dash-spec. dash-spec is an list of numbers where each successive pair of numbers describe the length of a dash and the length of the subsequent gap.