gears.shape: Add isosceles_triangle shape

This commit is contained in:
Emmanuel Lepage Vallee 2016-01-26 02:40:50 -05:00
parent 0bf76dc984
commit 348cd3a590
1 changed files with 11 additions and 0 deletions

View File

@ -157,6 +157,17 @@ function module.powerline(cr, width, height, arrow_depth)
cr:close_path() cr:close_path()
end end
--- An isosceles triangle
-- @param cr A cairo context
-- @tparam number width The shape with
-- @tparam number height The shape height
function module.isosceles_triangle(cr, width, height)
cr:move_to( width/2, 0 )
cr:line_to( width , height )
cr:line_to( 0 , height )
cr:close_path()
end
--- Ajust the shape using a transformation object --- Ajust the shape using a transformation object
-- --
-- Apply various transformations to the shape -- Apply various transformations to the shape