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

Return the n biggest rectangles #27

Open
kaka1909 opened this issue Oct 16, 2023 · 5 comments
Open

Return the n biggest rectangles #27

kaka1909 opened this issue Oct 16, 2023 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@kaka1909
Copy link

First of all, many thanks for your project which help me a lot in my work. And I have a question that, is there any way to find the largest horizon rectangle inside a shape? I need a horizon rectangle to put some words in it.

Thanks,
Mi

@lukasalexanderweber
Copy link
Member

Can you make a sketch to describe what excatly you need ?

@kaka1909
Copy link
Author

kaka1909 commented Oct 23, 2023

Can you make a sketch to describe what excatly you need ?

Yes. Actually I am trying to find a large horizontal "empty" area outside the main object(like the man in below picture) to put some words in it.

mihai_rect_副本

In this figure, the blue rectangle is the largest rectangle computed by lir, it seems too narrow if I put some words in it. So in this example, maybe the green rectangle( the largest horizontal rectangle) which is indeed smaller than blue one is better for my needs.

Thanks a lot.

@lukasalexanderweber
Copy link
Member

I think there should be the possibility to return multiple rectangles ordered by size

@kaka1909
Copy link
Author

Yes, that will be great.

@warriorstar-orion
Copy link

I would love this as well. As the reporter said, having the widest available rectangle is very useful for finding where text can be placed. If a list of rectangles is returned I imagine you don't even really need to sort them, the caller can sift through them to find the widest themselves.

@lukasalexanderweber lukasalexanderweber added enhancement New feature or request good first issue Good for newcomers labels Feb 15, 2024
@lukasalexanderweber lukasalexanderweber changed the title Is there any way to find the largest horizon rectangle? Return the n biggest rectangles Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants