drawBezier method

void drawBezier(
  1. List<PointInfo> coordinates
)

DrawBezier() draws a bezier curve through a set of points on the image.

  • coordinates : coordinates

Implementation

void drawBezier(List<PointInfo> coordinates) => using(
      (Arena arena) {
        if (coordinates.isEmpty) return;
        Pointer<mwbg.PointInfo> coordinatesPointer =
            arena(coordinates.length);
        for (int i = 0; i < coordinates.length; i++) {
          coordinatesPointer[i] =
              coordinates[i]._toPointInfoStructPointer(allocator: arena).ref;
        }
        _magickWandBindings.DrawBezier(
          _wandPtr,
          coordinates.length,
          coordinatesPointer,
        );
      },
    );