shape: Add rectangle shape

This commit is contained in:
Emmanuel Lepage Vallee 2016-03-09 23:42:14 -05:00
parent 990619db5a
commit 7b4109265e
1 changed files with 8 additions and 0 deletions

View File

@ -241,6 +241,14 @@ function module.circle(cr, width, height)
cr:close_path()
end
-- A simple rectangle
-- @param cr A cairo context
-- @tparam number width The shape width
-- @tparam number height The shape height
function module.rectangle(cr, width, height)
cr:rectangle(0, 0, width, height)
end
--- Ajust the shape using a transformation object
--
-- Apply various transformations to the shape