18 lines
502 B
Plaintext
18 lines
502 B
Plaintext
zoom_in = function(x,y)
|
|
-- precondition: Zoomed_out
|
|
-- precondition: Viewport == Global_viewport
|
|
-- precondition: Save_viewport exists
|
|
-- center Viewport on x,y at zoom level Saved_viewport.zoom
|
|
snapshot_canvas()
|
|
Animating = {
|
|
{
|
|
x=sx(x)-App.screen.width/Save_viewport.zoom/2,
|
|
y=sy(y)-App.screen.height/Save_viewport.zoom/2,
|
|
w=App.screen.width/Save_viewport.zoom,
|
|
h=App.screen.height/Save_viewport.zoom,
|
|
zoom=Save_viewport.zoom,
|
|
},
|
|
}
|
|
Zoomed_out = nil
|
|
Save_viewport = nil
|
|
end |