Graphics 2-D Geometry; Basic Tests

test[0]=>,(use graphics.geometry)
warning: make-point already bound to #[tlv make-point] = #[<closure> make-point]
warning: TLV x already bound to (*TOP* (doc (@ (foo "bar")) (baz (@ (kind "a")) "123")))
test[1]=>

Points and Sizes

test[1]=>(define p0 (make-point 1 2))
value := p0
test[2]=>(define p1 (make-point 30 4))
value := p1
test[3]=>(x p1)
value := 30
test[4]=>(y p1)
value := 4
test[5]=>(define dp (point- p1 p0))
value := dp
test[6]=>(dx dp)
value := 29
test[7]=>(dy dp)
value := 2
test[8]=>(point+ p1 (make-size 10 10))
value := #[<point> 40 14]
test[9]=>

Rectangles

test[9]=>(define r0 (make-rect 0 0 20 10))
value := r0
test[10]=>(rect->values r0)
value[0] := 0
value[1] := 0
value[2] := 20
value[3] := 10
test[11]=>(size-width r0)
value := 20
test[12]=>(size-height r0)
value := 10
test[13]=>(origin-x r0)
value := 0
test[14]=>(origin-y r0)
value := 0
Executed using RScheme (v0.7.3.3-b24u, 2005-02-24) at 2005-02-24 13:37:58 CST