drawPolygon method

void drawPolygon(
  1. List<PointInfo> coordinates
)

DrawPolygon() draws a polygon using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates.

  • coordinates : the coordinates

Implementation

void drawPolygon(List<PointInfo> coordinates) => using(
      (Arena arena) {
        final Pointer<mwbg.PointInfo> coordinatesPtr =
            arena(coordinates.length);
        for (int i = 0; i < coordinates.length; i++) {
          coordinatesPtr[i] =
              coordinates[i]._toPointInfoStructPointer(allocator: arena).ref;
        }
        _magickWandBindings.DrawPolygon(
          _wandPtr,
          coordinates.length,
          coordinatesPtr,
        );
      },
    );