--
-- handy wrapper for the render list
--

function renderlist_ctor (self)

   self.list = {}
end

renderlist = class (renderlist_ctor)

function renderlist:insert (Command)

   table.insert (self.list, Command)
end

function renderlist:sub (R)

   self:insert (R.list)
end

function renderlist:translate (X, Y, R)

   self:insert { "translate", X, Y, R.list }
end

function renderlist:scale (X, Y, R)

   self:insert { "scale", X, Y, R.list }
end

function renderlist:camera (X, Y)

   self:insert { "camera", X, Y }
end

function renderlist:line (X0, Y0, X1, Y1, W)

   self:insert { "line", X0, Y0, X1, Y1, W }
end

function renderlist:picture (Texture)

   self:insert { "picture", Texture }
end