--
--	rastergraphics: raster graphics primitives
--	Copyright (C) 2007  David Wood <dcw@kent.ac.uk>
--
--	This library is free software; you can redistribute it and/or
--	modify it under the terms of the GNU Lesser General Public
--	License as published by the Free Software Foundation, either
--	version 2 of the License, or (at your option) any later version.
--
--	This library is distributed in the hope that it will be useful,
--	but WITHOUT ANY WARRANTY; without even the implied warranty of
--	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
--	Lesser General Public License for more details.
--
--	You should have received a copy of the GNU Lesser General Public
--	License along with this library.  If not, see
--	<http://www.gnu.org/licenses/>.
--

--** @module rastergraphics

--* Cover [@code dst] with copies of [@code dst]
--
--  @param src Source raster
--  @param dst Destination raster

PROC draw.wallpaper (VAL [][]INT src, [][]INT dst)

  VAL INT w IS SIZE src[0]:             -- width of src
  VAL INT d IS SIZE src:                -- depth of src
  VAL INT W IS SIZE dst[0]:             -- width of dst
  VAL INT D IS SIZE dst:                -- depth of dst
 
  SEQ i = 0 FOR D
    VAL INT ii IS i \ d:
    SEQ j = 0 FOR W
      VAL INT jj IS j \ w:
      dst[i][j] := src[ii][jj]
:
