graymap-drawline!

Synopsis

(graymap-drawline! bitmap from-x from-y to-x to-y)

Parameters

  • graymap
  • from-x
  • from-y
  • to-x
  • to-y

Description

The origin (0,0) is in located at the upper left, the X-axis is oriented downwards and the Y-axis goes to the right.

Side Effects

A line is drawn between both points incrementing each gray value on the way up to the maximum of 65535 (full white).

Return Value

unspecified (ok)

Example

> (define g (graymap-create 100 100))
g
> (graymap-drawline! g 0 0 20 50)
ok
> (graymap-drawline! g 20 0 0 50)
ok
> (graymap-normalize! g)
#<graymap(16) orow:-1 ocol:-1 xres:-1 yres:-1 w:100 h:100>
> (graymap-writepng g "graymap-drawline.png")
ok
>

The result displays as folows: graymap-drawline.png