Zooming image with no border
1 回表示 (過去 30 日間)
古いコメントを表示
I have a window that shows an image that I need to zoom in and out on, but I would like to get rid of the grey border that frames the image when zooming in. Examples below.
I'm guessing I need to somehow change the 'inner frame' dimensions to fill the window instead of it having the aspect ratio of the full image. I have tried the Border property but it only affects it in relation to the full image aspect ratio.
Full image:

Zoomed image:

0 件のコメント
回答 (1 件)
Walter Roberson
2016 年 6 月 1 日
Consider that if you had only zoomed by a small fraction then you would not expect the image to suddenly jump to fill the entire vertical space: you would probably expect instead that as you zoomed it would take up more and more of the vertical space until it reached the edge.
What you will probably want to do is give an ActionPostCallback on the zoom, that figures out the best InnerPosition to use taking into account the xlim and ylim and the image size and the available area. See http://blogs.mathworks.com/community/2007/12/10/focused-on-zooming/
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Data Exploration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!