routine DRAW.BORDER

define BORDER as an integer variable


let BORDER = 250

call OPEN.SEG.R
call GPRIORITY.R(SEGID.V, 1)
let POINT(1, 1) = V.XLO - BORDER    let POINT(2, 1) = V.YLO - BORDER
let POINT(1, 2) = V.XLO - BORDER    let POINT(2, 2) = V.YHI + BORDER
let POINT(1, 3) = V.XLO             let POINT(2, 3) = V.YHI + BORDER
let POINT(1, 4) = V.XLO             let POINT(2, 4) = V.YLO - BORDER
call FILLCOLOR.R(1)
call FILLSTYLE.R(1)
call FILLAREA.R(4, POINT(*, *))
call CLOSE.SEG.R

call OPEN.SEG.R
call GPRIORITY.R(SEGID.V, 1)
let POINT(1, 1) = V.XLO - BORDER    let POINT(2, 1) = V.YHI         
let POINT(1, 2) = V.XLO - BORDER    let POINT(2, 2) = V.YHI + BORDER
let POINT(1, 3) = V.XHI + BORDER    let POINT(2, 3) = V.YHI + BORDER
let POINT(1, 4) = V.XHI + BORDER    let POINT(2, 4) = V.YHI          
call FILLCOLOR.R(1)
call FILLSTYLE.R(1)
call FILLAREA.R(4, POINT(*, *))
call CLOSE.SEG.R

call OPEN.SEG.R
call GPRIORITY.R(SEGID.V, 1)
let POINT(1, 1) = V.XHI             let POINT(2, 1) = V.YHI + BORDER
let POINT(1, 2) = V.XHI + BORDER    let POINT(2, 2) = V.YHI + BORDER
let POINT(1, 3) = V.XHI + BORDER    let POINT(2, 3) = V.YLO - BORDER
let POINT(1, 4) = V.XHI             let POINT(2, 4) = V.YLO - BORDER
call FILLCOLOR.R(1)
call FILLSTYLE.R(1)
call FILLAREA.R(4, POINT(*, *))
call CLOSE.SEG.R

call OPEN.SEG.R
call GPRIORITY.R(SEGID.V, 1)
let POINT(1, 1) = V.XLO - BORDER    let POINT(2, 1) = V.YLO - BORDER
let POINT(1, 2) = V.XLO - BORDER    let POINT(2, 2) = V.YLO         
let POINT(1, 3) = V.XHI + BORDER    let POINT(2, 3) = V.YLO         
let POINT(1, 4) = V.XHI + BORDER    let POINT(2, 4) = V.YLO - BORDER
call FILLCOLOR.R(1)
call FILLSTYLE.R(1)
call FILLAREA.R(4, POINT(*, *))
call CLOSE.SEG.R

end
