bytedeco / javacpp

The missing bridge between Java and native C++
Other
4.46k stars 581 forks source link

RotatedRect.points accepts a single Point2f as an argument, instead of an array of Point2f's #661

Closed NAsejevs closed 1 year ago

NAsejevs commented 1 year ago
val rotatedRect = new RotatedRect(
  new Point2f(100, 100),
  new Size2f(100, 100),
  45
)

val point = new Point2f()
rotatedRect.points(point)

I would expect rotatedRect.points to accept Array[Point2f] or Point2fVector as a parameter, instead, Point2f is accepted. This seems like an oversight and results in a crash if Point2f is provided.

Maybe I'm doing something wrong?

NAsejevs commented 1 year ago

Wrong repo...

saudet commented 1 year ago

Call new Point2f(4) to allocate an array of 4.