gears.shape: Add rectangular_tag shape

This commit is contained in:
Emmanuel Lepage Vallee 2016-01-26 02:31:42 -05:00
parent a49b259c7f
commit 1060a3487e
1 changed files with 14 additions and 0 deletions

View File

@ -87,6 +87,20 @@ function module.infobubble(cr, width, height, corner_radius, arrow_size, arrow_p
cr:close_path()
end
--- A rectangle terminated by an arrow
-- @param cr A cairo context
-- @tparam number width The shape with
-- @tparam number height The shape height
function module.rectangular_tag(cr, width, height)
cr:move_to(0 , height/2)
cr:line_to(height/2 , 0 )
cr:line_to(width , 0 )
cr:line_to(width , height )
cr:line_to(height/2 , height )
cr:close_path()
end
--- Ajust the shape using a transformation object
--
-- Apply various transformations to the shape