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

add ability to resize packer #2

Merged
merged 1 commit into from
Sep 22, 2017
Merged

add ability to resize packer #2

merged 1 commit into from
Sep 22, 2017

Conversation

ashkitten
Copy link

This resolves #1

// The new skyline starts where the furthest one ends
let mut left = 0;
for skyline in self.skylines.iter() {
left = max(left, skyline.left);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember how all this stuff works exactly but shouldn't it be left = max(left, skyline.right()); instead?

Also, is the loop necessary? Skylines are probably already sorted and you can just take the last one if I remember correctly.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct, I have amended those changes.

@kryptan
Copy link
Owner

kryptan commented Sep 18, 2017

Thanks, didn't know someone is using this library)

Have you tested your changes?

@ashkitten
Copy link
Author

I have tested with my application. There was a slight bug before, but with the changes that you requested it's gone now. I tested at font sizes 100, 150, 200, 300, 500, and 1000 and the glyph atlas seems to come out right every time.

@ashkitten
Copy link
Author

bump

@kryptan kryptan merged commit 4fd9f64 into kryptan:master Sep 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow packer to be resized
2 participants