gears.shape: Add isosceles_triangle shape
This commit is contained in:
parent
0bf76dc984
commit
348cd3a590
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue