Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
NAsejevs opened this issue Mar 22, 2023 · 2 comments

Comments

@NAsejevs
Copy link

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?

@saudet
Copy link
Member

saudet commented Mar 22, 2023

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

@saudet
Copy link
Member

saudet commented Mar 22, 2023

Duplicate of bytedeco/javacpp#661

@saudet saudet marked this as a duplicate of bytedeco/javacpp#661 Mar 22, 2023
@saudet saudet closed this as completed Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants