Sfairadora

  • Reference Guide

draw_polygon

var_bmp <- draw_polygon(vertices, fill)
var_bmp <- draw_polygon(vertices, fill, outline)
var_bmp <- draw_polygon(vertices, fill, outline, mode)
The var_bmp parameter is an l-value referring to a variable of the type Bitmap. The function draws a polygon to the bitmap.

Parameters

var_bmp
An l-value of the type Bitmap to which the function draws.
vertices
The sequence of points to be connected by the line to draw the polygon. The parameter is of the type Seq(Coord). Example: {{10, 10}, {10, 20}, {20, 30}, {30, 30}}.
fill
The fill of the polygon.
outline
The line style of the polygon.
mode
A parameter of the Bool type. If it is set to TRUE, the places where the polygon overlaps itself will not be filled. (More exactly: the places where the polygon overlaps itself even number times). If the parameter is FALSE or not specified, all places included within the polygon will be filled.

Return Value

The return value is an l-value referring to the modified bitmap.