Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cpp/FOCV_Function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1020,11 +1020,16 @@ jsi::Object FOCV_Function::invoke(jsi::Runtime& runtime, const jsi::Value* argum
} break;
case hashString("fillConvexPoly", 14): {
auto img = args.asMatPtr(1);
auto pts = args.asMatVectorPtr(2);
auto color = args.asScalarPtr(3);
auto line_type = args.asNumber(4);

cv::fillConvexPoly(*img, *pts, *color, line_type);
if(args.isMat(2)) {
auto pts = args.asMatPtr(2);
cv::fillConvexPoly(*img, *pts, *color, line_type);
} else {
auto pts = args.asPointVectorPtr(2);
cv::fillConvexPoly(*img, *pts, *color, line_type);
}
} break;
case hashString("fillPoly", 8): {
auto img = args.asMatPtr(1);
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/availablefunctions.md
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ Fills a convex polygon.
invoke(
name: 'fillConvexPoly',
img: Mat,
pts: MatVector,
pts: Mat | PointVector,
color: Scalar,
lineType: LineTypes
): void;
Expand Down
3 changes: 2 additions & 1 deletion src/functions/ImageProcessing/Drawing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type {
Mat,
MatVector,
Point,
PointVector,
Scalar,
Size,
} from '../../objects/Objects';
Expand Down Expand Up @@ -135,7 +136,7 @@ export type Drawing = {
invoke(
name: 'fillConvexPoly',
img: Mat,
pts: MatVector,
pts: Mat | PointVector,
color: Scalar,
lineType: LineTypes
): void;
Expand Down
Loading