-
Notifications
You must be signed in to change notification settings - Fork 10
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
Toggle actual size/fit to screen #23
Comments
So, pressing |
Yes, pressing z should toggle between actual size and fit to window. The default for images smaller than the window should be actual size, and the default for images larger than the window should be fit to window. |
Question. When the image is larger than the display and actual size is desired, should the viewport focus on the center of the image? I'm heavily leaning toward centered. #22 May be related Centered
Or Top-left focus
|
I'd also definitely go with centred. Hadn't even thought of it as an option :) |
Just a heads up, https://rust-sdl2.github.io/rust-sdl2/sdl2/render/struct.Canvas.html#method.copy_ex |
Nice! Just need to get the center point of the texture. |
From what I've read, the center point for
So, perhaps what needs to be done manually is:
|
ToggleFit
toAction
enum inui.rs
actual_size
boolean to programz
key toToggleFit
inevent_action
function inui.rs
Action::ToggleFit
totoggle_fit
function inrun
inprogram.rs
toggle_fit
function flip theactual_size
booleanNext, Prev, Move, First, Last
etc, reset theactual_size
boolean. It should be true when both images are small than window, and false when any dimension is larger than the corresponding window dimension.The text was updated successfully, but these errors were encountered: