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

Upated (the refactored) the "fill_container()" function to entirely fills the container with no distortion, using scale, center and 'crop' the edges around the container. #84

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ederlima
Copy link

@ederlima ederlima commented Oct 1, 2014

Now the function fill_container fullfills the container, centering and cropping the image around the corners, provinding (almost) the same interaction like others zoom functions, eg: fit, with all combination of aspects (horizontal, vertical) of images.
It stills need some work, because i need to fix the fill_container() effect after rotate images and some functions, but the initial goal of the functions stills OK.

Updated the 'fill_container()' to fill the container and crop around
edges. There is no distortion anymore.
Refactored the logic, remove the modification in properties
img_object.display[width|height].
The fill_container() now fills entirely the container by scaliing,
centering and 'cropping' the image around the edges and provide
interaction with filled image.
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.

1 participant