# Gimp.Image.select_polygon

    @accepts(Gimp.Image, Gimp.ChannelOps, gsize, [float])
    @returns(bool)
    def select_polygon(self, operation, num_segs, segs):
        # Python wrapper for gimp_image_select_polygon()

Create a polygonal selection over the specified image.

This tool creates a polygonal selection over the specified image. The polygonal region can be either added to, subtracted from, or replace the contents of the previous selection mask. The polygon is specified through an array of floating point numbers and its length. The length of array must be 2n, where n is the number of points. Each point is defined by 2 floating point values which correspond to the x and y coordinates. If the final point does not connect to the starting point, a connecting segment is automatically added.

This procedure is affected by the following context setters: Gimp.context_set_antialias, Gimp.context_set_feather, Gimp.context_set_feather_radius.

Since 2.8

self

  The image.

operation

  The selection operation.

num_segs

  Number of points (count 1 coordinate as two points).

segs

  Array of points: { p1.x, p1.y, p2.x, p2.y, ..., pn.x, pn.y}.

Returns