Draw multiple polygon on a nativeRaster
image
nr_polygon(
nr,
x,
y,
id = NULL,
fill = "black",
color = NA,
linewidth = 1,
mitre_limit = linewidth
)
nativeRaster
Vectors of point coordinates
integer vector used to separate coordinates into
multiple polygons. Consecutive runs of the same id
value belong to the same polygon. If NULL (the default) then
all coordinates are assumed to be vertices of a single polygon.
fill color
Color as a character string. Either a standard R color
(e.g. 'blue', 'white')
or a hex color of the form #rrggbbaa
, #rrggbb
, #rgba
or #rgb
Line linewidth. Default: 1. If linewidth = 1
then a
naive version of Bresenham is used to draw the points. If linewidth
is greater than 1, then the line is convert to a triangle strip and
rendered as polygons.
Limit the size of the mitre when two lines meet at an acute angle and linewidth is greater than 1. Default: same as line linewidth which mostly looks OK.
Original nativeRaster
modified in-place