The ticks are reliably sparse, and there's a limit to zooming out.
AZ6CTT4SN7QA2CXWNJ6UQ7BNENF6G76NJY53PBNJSAPWYFIFWQ5QC
on.keychord_press = function(chord, key)
if Move then return end
if Manifest_navigator.reload then
load_manifest()
end
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
if (Viewport.zoom-0.1)*20 >= 1 then -- disallow font size of 0
Viewport.zoom = Viewport.zoom-0.1
B()
end
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-q' then
live.send_to_app('QUIT')
elseif Manifest_navigator.show then
keychord_press_on_manifest_navigator(chord, key)
elseif chord == 'C-n' then
new_definition()
A()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
edit.keychord_press(Cursor_node.editor, chord, key)
if not eq(Cursor_node.editor.screen_top1, old_top) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
local definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)
A(--[[preserve screen_top of cursor node]] true)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"Manifest_navigator":495,"Ticks_font":594,"y_of_schema1":364,"Cursor_node":172,"box_height":345,"Manifest":494,"on.code_change":306,"load_manifest":496,"get_manifest":497,"on.text_input":521,"Menu_background_color":611,"Definitions":503,"Menu_border_color":612,"new_definition":504,"Menu_command_color":613,"vy":546,"Menu_highlight_color":614,"draw_menu_bar":641,"add_thick_line":400,"copy_shape":396,"initialize_editor":450,"Viewport":604,"maybe_update_key_in_definitions":529,"compute_layout":385,"on.initialize":506,"A":507,"B":379,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"on_handle":547,"num_lines_for_manifest_navigator":619,"Surface":422,"scale":7,"on_text":539,"on.mouse_press":617,"manifest_navigator_up":628,"sx":544,"manifest_navigator_down":635,"vx":545,"delete_definition":631,"keychord_press_on_manifest_navigator":633,"text_input_on_manifest_navigator":634,"on.key_release":552,"manifest_coord":636,"manifest_index":637,"manifest_navigator_candidates":638,"move_candidate_to_front_of_manifest":632,"Mouse_cursor":559,"set_mouse_cursor":562,"load_from_iterator":623,"draw_ticks":663,"update_editor_box":570,"reset_manifest_navigator":621,"add_def_to_menu":640,"on.update":561,"on.keychord_press":666,"on.draw":565,"order_of_magnitude":573,"parent":665,"schema1_of_y":467,"Page":475,"tick_spec":660,"approximate":579,"sy":469,"line_height":365,"draw_cursor":639,"font":353,"on.mouse_release":554,"get_definition_from_app":624,"mouse_cursor":558,"on":1,"approximate_up":658}
on.keychord_press = function(chord, key)
if Move then return end
if Manifest_navigator.reload then
load_manifest()
end
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
print(Viewport.zoom)
if Viewport.zoom > 0.1 then -- disallow font size of 0
Viewport.zoom = Viewport.zoom-0.1
B()
end
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-q' then
live.send_to_app('QUIT')
elseif Manifest_navigator.show then
keychord_press_on_manifest_navigator(chord, key)
elseif chord == 'C-n' then
new_definition()
A()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
edit.keychord_press(Cursor_node.editor, chord, key)
if not eq(Cursor_node.editor.screen_top1, old_top) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
local definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)
A(--[[preserve screen_top of cursor node]] true)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"sy":469,"update_editor_box":570,"on.update":561,"get_definition_from_app":624,"load_from_iterator":623,"schema1_of_y":467,"Manifest_navigator":495,"reset_manifest_navigator":621,"tick_spec":660,"mouse_cursor":558,"y_of_schema1":364,"Mouse_cursor":559,"parent":664,"set_mouse_cursor":562,"draw_ticks":663,"line_height":365,"Manifest":494,"load_manifest":496,"get_manifest":497,"order_of_magnitude":573,"font":353,"draw_cursor":639,"approximate":579,"Definitions":503,"new_definition":504,"approximate_up":658,"add_thick_line":400,"copy_shape":396,"Ticks_font":594,"maybe_update_key_in_definitions":529,"Surface":422,"on.draw":565,"Viewport":604,"on_handle":547,"on.mouse_release":554,"Menu_background_color":611,"Menu_border_color":612,"on.text_input":521,"Menu_command_color":613,"A":507,"Menu_highlight_color":614,"scale":7,"draw_menu_bar":641,"B":379,"add_hotkey_to_menu":616,"Page":475,"draw_manifest_navigator":618,"num_lines_for_manifest_navigator":619,"on.key_release":552,"on":1,"Cursor_node":172,"manifest_navigator_up":628,"on.keychord_press":665,"manifest_navigator_down":635,"move_candidate_to_front_of_manifest":632,"vy":546,"delete_definition":631,"initialize_editor":450,"vx":545,"keychord_press_on_manifest_navigator":633,"sx":544,"text_input_on_manifest_navigator":634,"on.mouse_press":617,"on_text":539,"manifest_coord":636,"box_height":345,"manifest_index":637,"compute_layout":385,"manifest_navigator_candidates":638,"on.initialize":506,"on.code_change":306,"add_def_to_menu":640}
on.keychord_press = function(chord, key)
if Move then return end
if Manifest_navigator.reload then
load_manifest()
end
if chord == 'C-=' then
-- zoom in
Viewport.zoom = Viewport.zoom+0.1
B()
elseif chord == 'C--' then
-- zoom out
if Viewport.zoom > 0.1 then -- disallow font size of 0
Viewport.zoom = Viewport.zoom-0.1
B()
end
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0
B()
elseif chord == 'C-q' then
live.send_to_app('QUIT')
elseif Manifest_navigator.show then
keychord_press_on_manifest_navigator(chord, key)
elseif chord == 'C-n' then
new_definition()
A()
elseif chord == 'C-l' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = false
elseif chord == 'C-d' then
Manifest_navigator.show = true
Manifest_navigator.for_delete = true
elseif Cursor_node then
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
local old_definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
edit.keychord_press(Cursor_node.editor, chord, key)
if not eq(Cursor_node.editor.screen_top1, old_top) then
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
end
local definition_name = live.get_cmd_from_buffer(Cursor_node.editor.lines[1].data)
maybe_update_key_in_definitions(old_definition_name, definition_name, Cursor_node)
A(--[[preserve screen_top of cursor node]] true)
else
if chord == 'up' then
Viewport.y = Viewport.y - scale(20)
B()
elseif chord == 'down' then
Viewport.y = Viewport.y + scale(20)
B()
elseif chord == 'left' then
Viewport.x = Viewport.x - scale(50)
B()
elseif chord == 'right' then
Viewport.x = Viewport.x + scale(50)
B()
elseif chord == 'pageup' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'S-up' then
Viewport.y = Viewport.y - App.screen.height/Viewport.zoom
B()
elseif chord == 'pagedown' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-down' then
Viewport.y = Viewport.y + App.screen.height/Viewport.zoom
B()
elseif chord == 'S-left' then
Viewport.x = Viewport.x - App.screen.width/Viewport.zoom
B()
elseif chord == 'S-right' then
Viewport.x = Viewport.x + App.screen.width/Viewport.zoom
B()
end
end
end
{"order_of_magnitude":573,"approximate":579,"on.text_input":521,"on.initialize":506,"sy":469,"A":507,"approximate_up":658,"B":379,"box_height":345,"compute_layout":385,"get_definition_from_app":624,"schema1_of_y":467,"on.code_change":306,"y_of_schema1":364,"Manifest":494,"line_height":365,"load_manifest":496,"get_manifest":497,"Menu_border_color":612,"Menu_command_color":613,"initialize_editor":450,"Menu_highlight_color":614,"Definitions":503,"draw_menu_bar":641,"new_definition":504,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"num_lines_for_manifest_navigator":619,"add_thick_line":400,"copy_shape":396,"Cursor_node":172,"maybe_update_key_in_definitions":529,"manifest_navigator_up":628,"manifest_navigator_down":635,"delete_definition":631,"keychord_press_on_manifest_navigator":633,"text_input_on_manifest_navigator":634,"manifest_coord":636,"manifest_index":637,"on_handle":547,"font":353,"add_def_to_menu":640,"on_text":539,"on.mouse_press":617,"sx":544,"draw_cursor":639,"vx":545,"on.draw":565,"tick_spec":660,"Viewport":604,"on.key_release":552,"load_from_iterator":623,"parent":663,"Surface":422,"update_editor_box":570,"manifest_navigator_candidates":638,"move_candidate_to_front_of_manifest":632,"reset_manifest_navigator":621,"scale":7,"mouse_cursor":558,"on.mouse_release":554,"Mouse_cursor":559,"on.update":561,"Menu_background_color":611,"on.keychord_press":664,"set_mouse_cursor":562,"vy":546,"draw_ticks":663,"Page":475,"Manifest_navigator":495,"Ticks_font":594,"on":1}
{"order_of_magnitude":573,"approximate":579,"on.text_input":521,"on.initialize":506,"sy":469,"A":507,"approximate_up":658,"B":379,"box_height":345,"compute_layout":385,"get_definition_from_app":624,"schema1_of_y":467,"on.code_change":306,"y_of_schema1":364,"Manifest":494,"line_height":365,"load_manifest":496,"get_manifest":497,"Menu_border_color":612,"Menu_command_color":613,"initialize_editor":450,"Menu_highlight_color":614,"Definitions":503,"draw_menu_bar":641,"new_definition":504,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"num_lines_for_manifest_navigator":619,"add_thick_line":400,"copy_shape":396,"Cursor_node":172,"maybe_update_key_in_definitions":529,"manifest_navigator_up":628,"manifest_navigator_down":635,"delete_definition":631,"keychord_press_on_manifest_navigator":633,"text_input_on_manifest_navigator":634,"manifest_coord":636,"manifest_index":637,"on_handle":547,"font":353,"add_def_to_menu":640,"on_text":539,"on.mouse_press":617,"sx":544,"draw_cursor":639,"vx":545,"on.draw":565,"tick_spec":660,"Viewport":604,"on.key_release":552,"load_from_iterator":623,"parent":662,"Surface":422,"update_editor_box":570,"manifest_navigator_candidates":638,"move_candidate_to_front_of_manifest":632,"reset_manifest_navigator":621,"scale":7,"mouse_cursor":558,"on.mouse_release":554,"Mouse_cursor":559,"on.update":561,"Menu_background_color":611,"on.keychord_press":610,"set_mouse_cursor":562,"vy":546,"draw_ticks":663,"Page":475,"Manifest_navigator":495,"Ticks_font":594,"on":1}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local anchorlo, anchorhi, scale = tick_spec(Viewport.x, sx(App.screen.width))
for x=anchorlo,anchorhi,scale do
local vx = vx(x)
love.graphics.line(vx, Menu_bar_height, vx, Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx+2, Menu_bar_height+5)
love.graphics.line(vx, App.screen.height, vx, App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx+2, App.screen.height-15)
end
-- y axis
local anchorlo, anchorhi, scale = tick_spec(Viewport.y, sy(App.screen.height))
for y=anchorlo,anchorhi,scale do
local vy = vy(y)
love.graphics.line(0, vy, 5, vy)
love.graphics.print(('%2.0f'):format(y), 5, vy+2)
love.graphics.line(App.screen.width, vy, App.screen.width-5, vy)
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy+2)
end
love.graphics.setFont(old_font)
end
{"order_of_magnitude":573,"approximate":579,"on.text_input":521,"on.initialize":506,"sy":469,"A":507,"approximate_up":658,"B":379,"box_height":345,"compute_layout":385,"get_definition_from_app":624,"schema1_of_y":467,"on.code_change":306,"y_of_schema1":364,"Manifest":494,"line_height":365,"load_manifest":496,"get_manifest":497,"Menu_border_color":612,"Menu_command_color":613,"initialize_editor":450,"Menu_highlight_color":614,"Definitions":503,"draw_menu_bar":641,"new_definition":504,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"num_lines_for_manifest_navigator":619,"add_thick_line":400,"copy_shape":396,"Cursor_node":172,"maybe_update_key_in_definitions":529,"manifest_navigator_up":628,"manifest_navigator_down":635,"delete_definition":631,"keychord_press_on_manifest_navigator":633,"text_input_on_manifest_navigator":634,"manifest_coord":636,"manifest_index":637,"on_handle":547,"font":353,"add_def_to_menu":640,"on_text":539,"on.mouse_press":617,"sx":544,"draw_cursor":639,"vx":545,"on.draw":565,"tick_spec":660,"Viewport":604,"on.key_release":552,"load_from_iterator":623,"parent":661,"Surface":422,"update_editor_box":570,"manifest_navigator_candidates":638,"move_candidate_to_front_of_manifest":632,"reset_manifest_navigator":621,"scale":7,"mouse_cursor":558,"on.mouse_release":554,"Mouse_cursor":559,"on.update":561,"Menu_background_color":611,"on.keychord_press":610,"set_mouse_cursor":562,"vy":546,"draw_ticks":662,"Page":475,"Manifest_navigator":495,"Ticks_font":594,"on":1}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local anchorlo, anchorhi, scale = tick_spec(Viewport.x, sx(App.screen.width))
for x=anchorlo,anchorhi,scale do
local vx = vx(x)
love.graphics.line(vx, Menu_bar_height, vx, Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx, App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx+2, App.screen.height-15)
end
-- y axis
local anchorlo, anchorhi, scale = tick_spec(Viewport.y, sy(App.screen.height))
for y=anchorlo,anchorhi,scale do
local vy = vy(y)
love.graphics.line(0, vy, 5, vy)
love.graphics.print(('%2.0f'):format(y), 5, vy+2)
love.graphics.line(App.screen.width, vy, App.screen.width-5, vy)
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy+2)
end
love.graphics.setFont(old_font)
end
{"order_of_magnitude":573,"approximate":579,"on.text_input":521,"on.initialize":506,"sy":469,"A":507,"approximate_up":658,"B":379,"box_height":345,"compute_layout":385,"get_definition_from_app":624,"schema1_of_y":467,"on.code_change":306,"y_of_schema1":364,"Manifest":494,"line_height":365,"load_manifest":496,"get_manifest":497,"Menu_border_color":612,"Menu_command_color":613,"initialize_editor":450,"Menu_highlight_color":614,"Definitions":503,"draw_menu_bar":641,"new_definition":504,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"num_lines_for_manifest_navigator":619,"add_thick_line":400,"copy_shape":396,"Cursor_node":172,"maybe_update_key_in_definitions":529,"manifest_navigator_up":628,"manifest_navigator_down":635,"delete_definition":631,"keychord_press_on_manifest_navigator":633,"text_input_on_manifest_navigator":634,"manifest_coord":636,"manifest_index":637,"on_handle":547,"font":353,"add_def_to_menu":640,"on_text":539,"on.mouse_press":617,"sx":544,"draw_cursor":639,"vx":545,"on.draw":565,"tick_spec":660,"Viewport":604,"on.key_release":552,"load_from_iterator":623,"parent":660,"Surface":422,"update_editor_box":570,"manifest_navigator_candidates":638,"move_candidate_to_front_of_manifest":632,"reset_manifest_navigator":621,"scale":7,"mouse_cursor":558,"on.mouse_release":554,"Mouse_cursor":559,"on.update":561,"Menu_background_color":611,"on.keychord_press":610,"set_mouse_cursor":562,"vy":546,"draw_ticks":661,"Page":475,"Manifest_navigator":495,"Ticks_font":594,"on":1}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local anchorlo, anchorhi, scale = tick_spec(Viewport.x, sx(App.screen.width))
for x=anchorlo,anchorhi,scale do
love.graphics.line(vx(x), Menu_bar_height, vx(x), Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx(x), App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, App.screen.height-15)
end
-- y axis
local anchorlo, anchorhi, scale = tick_spec(Viewport.y, sy(App.screen.height))
for y=anchorlo,anchorhi,scale do
love.graphics.line(0, vy(y), 5, vy(y))
love.graphics.print(('%2.0f'):format(y), 5, vy(y)+2)
love.graphics.line(App.screen.width, vy(y), App.screen.width-5, vy(y))
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy(y)+2)
end
love.graphics.setFont(old_font)
end
tick_spec = function(lo, hi)
-- given an interval of numbers, return a nice set of ticks to draw for the interval
-- the ticks will try to be at multiples of 10, or some multiple of a power of 10
-- we don't want to overwhelm the viewer, so we'll aim for between 2 and 4 ticks
-- the ticks will be specified as a low and high value, and a delta between consecutive ticks
local anchorlo, scale = approximate(lo, order_of_magnitude(hi-lo))
local anchorhi = approximate_up(hi, order_of_magnitude(hi-lo))
-- print('---', lo, hi, order_of_magnitude(hi-lo), anchorlo, anchorhi, scale)
while (anchorhi-anchorlo)/scale < 2 do
-- print('a', anchorlo, anchorhi, scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
-- print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
-- print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
-- print('d', scale, (anchorhi-anchorlo)/scale)
return anchorlo, anchorhi, scale
end
{"order_of_magnitude":573,"approximate":579,"on.text_input":521,"on.initialize":506,"sy":469,"A":507,"approximate_up":658,"B":379,"box_height":345,"compute_layout":385,"get_definition_from_app":624,"schema1_of_y":467,"on.code_change":306,"y_of_schema1":364,"Manifest":494,"line_height":365,"load_manifest":496,"get_manifest":497,"Menu_border_color":612,"Menu_command_color":613,"initialize_editor":450,"Menu_highlight_color":614,"Definitions":503,"draw_menu_bar":641,"new_definition":504,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"num_lines_for_manifest_navigator":619,"add_thick_line":400,"copy_shape":396,"Cursor_node":172,"maybe_update_key_in_definitions":529,"manifest_navigator_up":628,"manifest_navigator_down":635,"delete_definition":631,"keychord_press_on_manifest_navigator":633,"text_input_on_manifest_navigator":634,"manifest_coord":636,"manifest_index":637,"on_handle":547,"font":353,"add_def_to_menu":640,"on_text":539,"on.mouse_press":617,"sx":544,"draw_cursor":639,"vx":545,"on.draw":565,"tick_spec":660,"Viewport":604,"on.key_release":552,"load_from_iterator":623,"parent":659,"Surface":422,"update_editor_box":570,"manifest_navigator_candidates":638,"move_candidate_to_front_of_manifest":632,"reset_manifest_navigator":621,"scale":7,"mouse_cursor":558,"on.mouse_release":554,"Mouse_cursor":559,"on.update":561,"Menu_background_color":611,"on.keychord_press":610,"set_mouse_cursor":562,"vy":546,"draw_ticks":659,"Page":475,"Manifest_navigator":495,"Ticks_font":594,"on":1}
{"schema1_of_y":467,"manifest_navigator_up":628,"manifest_navigator_down":635,"box_height":345,"Menu_background_color":611,"y_of_schema1":364,"Menu_border_color":612,"Menu_command_color":613,"Cursor_node":172,"text_input_on_manifest_navigator":634,"manifest_coord":636,"manifest_index":637,"add_thick_line":400,"manifest_navigator_candidates":638,"copy_shape":396,"font":353,"add_def_to_menu":640,"load_manifest":496,"get_manifest":497,"maybe_update_key_in_definitions":529,"approximate_up":658,"initialize_editor":450,"new_definition":504,"vx":545,"vy":546,"Page":475,"on_handle":547,"on_text":539,"sx":544,"on":1,"on.key_release":552,"on.initialize":506,"A":507,"mouse_cursor":558,"B":379,"Mouse_cursor":559,"scale":7,"set_mouse_cursor":562,"on.draw":565,"move_candidate_to_front_of_manifest":632,"order_of_magnitude":573,"draw_cursor":639,"get_definition_from_app":624,"sy":469,"approximate":579,"on.mouse_release":554,"reset_manifest_navigator":621,"on.keychord_press":610,"Manifest":494,"on.mouse_press":617,"keychord_press_on_manifest_navigator":633,"on.update":561,"Manifest_navigator":495,"delete_definition":631,"Ticks_font":594,"on.text_input":521,"Menu_highlight_color":614,"line_height":365,"draw_menu_bar":641,"num_lines_for_manifest_navigator":619,"add_hotkey_to_menu":616,"draw_ticks":659,"on.code_change":306,"draw_manifest_navigator":618,"compute_layout":385,"update_editor_box":570,"Definitions":503,"Surface":422,"parent":658,"load_from_iterator":623,"Viewport":604}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local lo, hi = Viewport.x, sx(App.screen.width)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---', lo, hi, anchorlo, anchorhi, scale)
while (anchorhi-anchorlo)/scale < 2 do
print('a', anchorlo, anchorhi, scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
print('d', scale, (anchorhi-anchorlo)/scale)
for x=anchorlo,anchorhi,scale do
love.graphics.line(vx(x), Menu_bar_height, vx(x), Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx(x), App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, App.screen.height-15)
end
-- y axis
local lo, hi = Viewport.y, sy(App.screen.height)
local anchorlo, scale = approximate(lo, order_of_magnitude(hi-lo))
local anchorhi = approximate_up(hi, order_of_magnitude(hi-lo))
--- -50 998.88888888889 3 1000 0 1000
print('---', lo, hi, order_of_magnitude(hi-lo), anchorlo, anchorhi, scale)
while (anchorhi-anchorlo)/scale < 2 do
print('a', anchorlo, anchorhi, scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
print('d', scale, (anchorhi-anchorlo)/scale)
for y=anchorlo,anchorhi,scale do
love.graphics.line(0, vy(y), 5, vy(y))
love.graphics.print(('%2.0f'):format(y), 5, vy(y)+2)
love.graphics.line(App.screen.width, vy(y), App.screen.width-5, vy(y))
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy(y)+2)
end
love.graphics.setFont(old_font)
end
{"Cursor_node":172,"on.text_input":521,"compute_layout":385,"on_text":539,"on.code_change":306,"update_editor_box":570,"sx":544,"Menu_background_color":611,"schema1_of_y":467,"Menu_border_color":612,"Menu_command_color":613,"Menu_highlight_color":614,"y_of_schema1":364,"draw_menu_bar":641,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"num_lines_for_manifest_navigator":619,"add_thick_line":400,"font":353,"copy_shape":396,"manifest_navigator_up":628,"scale":7,"delete_definition":631,"keychord_press_on_manifest_navigator":633,"text_input_on_manifest_navigator":634,"manifest_coord":636,"manifest_index":637,"manifest_navigator_candidates":638,"move_candidate_to_front_of_manifest":632,"on":1,"get_definition_from_app":624,"load_from_iterator":623,"vx":545,"reset_manifest_navigator":621,"draw_cursor":639,"on.key_release":552,"parent":657,"mouse_cursor":558,"load_manifest":496,"Mouse_cursor":559,"get_manifest":497,"on.initialize":506,"set_mouse_cursor":562,"vy":546,"draw_ticks":657,"B":379,"Definitions":503,"new_definition":504,"order_of_magnitude":573,"Surface":422,"approximate":579,"on.draw":565,"maybe_update_key_in_definitions":529,"Viewport":604,"sy":469,"line_height":365,"approximate_up":658,"box_height":345,"Page":475,"add_def_to_menu":640,"manifest_navigator_down":635,"Ticks_font":594,"A":507,"on.mouse_release":554,"initialize_editor":450,"on.update":561,"Manifest_navigator":495,"on.keychord_press":610,"on.mouse_press":617,"Manifest":494,"on_handle":547}
approximate_up = function(n, zeros)
-- turn n into a number with n zeros
local magnitude = 1
for i=1,zeros do
magnitude = magnitude*10
end
n = n + magnitude/2
for i=1,zeros do
n = n/10
end
n= math.ceil(n)
for i=1,zeros do
n = n*10
end
return n, magnitude
end
{"sx":544,"vx":545,"line_height":365,"on.key_release":552,"Surface":422,"on.code_change":306,"on.text_input":521,"mouse_cursor":558,"Mouse_cursor":559,"set_mouse_cursor":562,"draw_ticks":657,"Viewport":604,"order_of_magnitude":573,"initialize_editor":450,"on.initialize":506,"approximate":579,"A":507,"sy":469,"B":379,"approximate_up":583,"Ticks_font":594,"Manifest_navigator":495,"update_editor_box":570,"Manifest":494,"load_manifest":496,"schema1_of_y":467,"get_manifest":497,"Menu_background_color":611,"y_of_schema1":364,"Menu_border_color":612,"Definitions":503,"Menu_command_color":613,"on.mouse_release":554,"Menu_highlight_color":614,"on.draw":565,"draw_menu_bar":641,"scale":7,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"vy":546,"num_lines_for_manifest_navigator":619,"Cursor_node":172,"on_handle":547,"maybe_update_key_in_definitions":529,"add_def_to_menu":640,"new_definition":504,"on.update":561,"draw_cursor":639,"manifest_navigator_up":628,"get_definition_from_app":624,"manifest_navigator_down":635,"on":1,"Page":475,"delete_definition":631,"on.keychord_press":610,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":633,"add_thick_line":400,"text_input_on_manifest_navigator":634,"font":353,"on_text":539,"manifest_coord":636,"load_from_iterator":623,"manifest_index":637,"box_height":345,"manifest_navigator_candidates":638,"parent":656,"reset_manifest_navigator":621,"on.mouse_press":617,"copy_shape":396,"compute_layout":385}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local lo, hi = Viewport.x, sx(App.screen.width)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---', lo, hi, anchorlo, anchorhi, scale)
while (anchorhi-anchorlo)/scale < 2 do
print('a', anchorlo, anchorhi, scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
print('d', scale, (anchorhi-anchorlo)/scale)
for x=anchorlo,anchorhi,scale do
love.graphics.line(vx(x), Menu_bar_height, vx(x), Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx(x), App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, App.screen.height-15)
end
-- y axis
local lo, hi = Viewport.y, sy(App.screen.height)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---', lo, hi, order_of_magnitude(hi-lo), anchorlo, anchorhi, scale)
while (anchorhi-anchorlo)/scale < 2 do
print('a', anchorlo, anchorhi, scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
print('d', scale, (anchorhi-anchorlo)/scale)
for y=anchorlo,anchorhi,scale do
love.graphics.line(0, vy(y), 5, vy(y))
love.graphics.print(('%2.0f'):format(y), 5, vy(y)+2)
love.graphics.line(App.screen.width, vy(y), App.screen.width-5, vy(y))
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy(y)+2)
end
love.graphics.setFont(old_font)
end
{"sx":544,"vx":545,"line_height":365,"on.key_release":552,"Surface":422,"on.code_change":306,"on.text_input":521,"mouse_cursor":558,"Mouse_cursor":559,"set_mouse_cursor":562,"draw_ticks":656,"Viewport":604,"order_of_magnitude":573,"initialize_editor":450,"on.initialize":506,"approximate":579,"A":507,"sy":469,"B":379,"approximate_up":583,"Ticks_font":594,"Manifest_navigator":495,"update_editor_box":570,"Manifest":494,"load_manifest":496,"schema1_of_y":467,"get_manifest":497,"Menu_background_color":611,"y_of_schema1":364,"Menu_border_color":612,"Definitions":503,"Menu_command_color":613,"on.mouse_release":554,"Menu_highlight_color":614,"on.draw":565,"draw_menu_bar":641,"scale":7,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"vy":546,"num_lines_for_manifest_navigator":619,"Cursor_node":172,"on_handle":547,"maybe_update_key_in_definitions":529,"add_def_to_menu":640,"new_definition":504,"on.update":561,"draw_cursor":639,"manifest_navigator_up":628,"get_definition_from_app":624,"manifest_navigator_down":635,"on":1,"Page":475,"delete_definition":631,"on.keychord_press":610,"move_candidate_to_front_of_manifest":632,"keychord_press_on_manifest_navigator":633,"add_thick_line":400,"text_input_on_manifest_navigator":634,"font":353,"on_text":539,"manifest_coord":636,"load_from_iterator":623,"manifest_index":637,"box_height":345,"manifest_navigator_candidates":638,"parent":655,"reset_manifest_navigator":621,"on.mouse_press":617,"copy_shape":396,"compute_layout":385}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local lo, hi = Viewport.x, sx(App.screen.width)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---', lo, hi, anchorlo, anchorhi, scale)
while (anchorhi-anchorlo)/scale < 2 do
print('a', anchorlo, anchorhi, scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
print('d', scale, (anchorhi-anchorlo)/scale)
for x=anchorlo,anchorhi,scale do
love.graphics.line(vx(x), Menu_bar_height, vx(x), Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx(x), App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, App.screen.height-15)
end
-- y axis
local lo, hi = Viewport.y, sy(App.screen.height)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---', lo, hi, order_of_magniude(hi-lo), anchorlo, anchorhi, scale)
while (anchorhi-anchorlo)/scale < 2 do
print('a', anchorlo, anchorhi, scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
print('d', scale, (anchorhi-anchorlo)/scale)
for y=anchorlo,anchorhi,scale do
love.graphics.line(0, vy(y), 5, vy(y))
love.graphics.print(('%2.0f'):format(y), 5, vy(y)+2)
love.graphics.line(App.screen.width, vy(y), App.screen.width-5, vy(y))
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy(y)+2)
end
love.graphics.setFont(old_font)
end
{"add_thick_line":400,"copy_shape":396,"maybe_update_key_in_definitions":529,"on.initialize":506,"line_height":365,"A":507,"B":379,"mouse_cursor":558,"Mouse_cursor":559,"Page":475,"set_mouse_cursor":562,"on_handle":547,"on_text":539,"order_of_magnitude":573,"sx":544,"on.mouse_release":554,"vx":545,"approximate":579,"on":1,"on.keychord_press":610,"on.text_input":521,"approximate_up":583,"compute_layout":385,"Ticks_font":594,"on.code_change":306,"vy":546,"Surface":422,"on.draw":565,"Viewport":604,"Menu_background_color":611,"sy":469,"Menu_border_color":612,"Menu_command_color":613,"initialize_editor":450,"Menu_highlight_color":614,"draw_menu_bar":641,"box_height":345,"add_hotkey_to_menu":616,"schema1_of_y":467,"num_lines_for_manifest_navigator":619,"draw_manifest_navigator":618,"font":353,"y_of_schema1":364,"new_definition":504,"on.update":561,"on.key_release":552,"parent":654,"draw_ticks":655,"manifest_navigator_up":628,"draw_cursor":639,"manifest_navigator_down":635,"Manifest":494,"manifest_navigator_candidates":638,"delete_definition":631,"load_manifest":496,"Definitions":503,"keychord_press_on_manifest_navigator":633,"Cursor_node":172,"text_input_on_manifest_navigator":634,"move_candidate_to_front_of_manifest":632,"get_manifest":497,"manifest_coord":636,"scale":7,"manifest_index":637,"get_definition_from_app":624,"load_from_iterator":623,"on.mouse_press":617,"Manifest_navigator":495,"add_def_to_menu":640,"update_editor_box":570,"reset_manifest_navigator":621}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local lo, hi = Viewport.x, sx(App.screen.width)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---', lo, hi, anchorlo, anchorhi, scale)
while (anchorhi-anchorlo)/scale < 2 do
print('a', anchorlo, anchorhi, scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
print('d', scale, (anchorhi-anchorlo)/scale)
for x=anchorlo,anchorhi,scale do
love.graphics.line(vx(x), Menu_bar_height, vx(x), Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx(x), App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, App.screen.height-15)
end
-- y axis
local lo, hi = Viewport.y, sy(App.screen.height)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---', lo, hi, anchorlo, anchorhi, scale)
while (anchorhi-anchorlo)/scale < 2 do
print('a', anchorlo, anchorhi, scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
print('d', scale, (anchorhi-anchorlo)/scale)
for y=anchorlo,anchorhi,scale do
love.graphics.line(0, vy(y), 5, vy(y))
love.graphics.print(('%2.0f'):format(y), 5, vy(y)+2)
love.graphics.line(App.screen.width, vy(y), App.screen.width-5, vy(y))
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy(y)+2)
end
love.graphics.setFont(old_font)
end
{"on.key_release":552,"manifest_index":637,"move_candidate_to_front_of_manifest":632,"manifest_navigator_candidates":638,"Surface":422,"draw_cursor":639,"mouse_cursor":558,"get_definition_from_app":624,"Mouse_cursor":559,"Viewport":604,"set_mouse_cursor":562,"reset_manifest_navigator":621,"draw_ticks":654,"Manifest_navigator":495,"order_of_magnitude":573,"on.mouse_release":554,"line_height":365,"y_of_schema1":364,"Cursor_node":172,"approximate":579,"Manifest":494,"approximate_up":583,"Ticks_font":594,"on.text_input":521,"parent":653,"compute_layout":385,"on.initialize":506,"copy_shape":396,"on.code_change":306,"load_manifest":496,"get_manifest":497,"B":379,"Menu_background_color":611,"Menu_border_color":612,"Definitions":503,"Menu_highlight_color":614,"draw_menu_bar":641,"add_hotkey_to_menu":616,"scale":7,"num_lines_for_manifest_navigator":619,"initialize_editor":450,"maybe_update_key_in_definitions":529,"manifest_navigator_up":628,"manifest_navigator_down":635,"delete_definition":631,"box_height":345,"add_def_to_menu":640,"keychord_press_on_manifest_navigator":633,"on.mouse_press":617,"text_input_on_manifest_navigator":634,"add_thick_line":400,"A":507,"manifest_coord":636,"update_editor_box":570,"load_from_iterator":623,"on.draw":565,"Menu_command_color":613,"on.keychord_press":610,"on_text":539,"on":1,"Page":475,"vy":546,"schema1_of_y":467,"on_handle":547,"sx":544,"on.update":561,"vx":545,"new_definition":504,"font":353,"draw_manifest_navigator":618,"sy":469}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local lo, hi = Viewport.x, sx(App.screen.width)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---', lo, hi, anchorlo, anchorhi, scale)
while (anchorhi-anchorlo)/scale < 2 do
print('a', anchorlo, anchorhi, scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
print('d', scale, (anchorhi-anchorlo)/scale)
for x=anchorlo,anchorhi,scale do
love.graphics.line(vx(x), Menu_bar_height, vx(x), Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx(x), App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, App.screen.height-15)
end
-- y axis
local lo, hi = Viewport.y, sy(App.screen.height)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---')
while (anchorhi-anchorlo)/scale < 2 do
print('a', anchorlo, anchorhi, scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
print('d', scale, (anchorhi-anchorlo)/scale)
for y=anchorlo,anchorhi,scale do
love.graphics.line(0, vy(y), 5, vy(y))
love.graphics.print(('%2.0f'):format(y), 5, vy(y)+2)
love.graphics.line(App.screen.width, vy(y), App.screen.width-5, vy(y))
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy(y)+2)
end
love.graphics.setFont(old_font)
end
{"vx":545,"Viewport":604,"get_definition_from_app":624,"load_from_iterator":623,"on_handle":547,"reset_manifest_navigator":621,"on.update":561,"on_text":539,"parent":652,"Page":475,"sx":544,"on.mouse_release":554,"draw_cursor":639,"on.key_release":552,"line_height":365,"Cursor_node":172,"mouse_cursor":558,"Mouse_cursor":559,"on":1,"set_mouse_cursor":562,"y_of_schema1":364,"draw_ticks":653,"box_height":345,"on.initialize":506,"order_of_magnitude":573,"A":507,"on.code_change":306,"scale":7,"update_editor_box":570,"sy":469,"approximate_up":583,"Ticks_font":594,"on.keychord_press":610,"add_thick_line":400,"Menu_background_color":611,"copy_shape":396,"Menu_border_color":612,"Menu_command_color":613,"Menu_highlight_color":614,"draw_menu_bar":641,"add_hotkey_to_menu":616,"Manifest":494,"draw_manifest_navigator":618,"load_manifest":496,"get_manifest":497,"initialize_editor":450,"Definitions":503,"manifest_navigator_up":628,"new_definition":504,"manifest_navigator_down":635,"vy":546,"Manifest_navigator":495,"delete_definition":631,"approximate":579,"font":353,"keychord_press_on_manifest_navigator":633,"compute_layout":385,"text_input_on_manifest_navigator":634,"B":379,"num_lines_for_manifest_navigator":619,"manifest_coord":636,"schema1_of_y":467,"manifest_index":637,"maybe_update_key_in_definitions":529,"manifest_navigator_candidates":638,"on.mouse_press":617,"Surface":422,"add_def_to_menu":640,"on.text_input":521,"on.draw":565,"move_candidate_to_front_of_manifest":632}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local lo, hi = Viewport.x, sx(App.screen.width)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---')
while (anchorhi-anchorlo)/scale < 2 do
print('a', anchorlo, anchorhi, scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
print('d', scale, (anchorhi-anchorlo)/scale)
for x=anchorlo,anchorhi,scale do
love.graphics.line(vx(x), Menu_bar_height, vx(x), Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx(x), App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, App.screen.height-15)
end
-- y axis
local lo, hi = Viewport.y, sy(App.screen.height)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---')
while (anchorhi-anchorlo)/scale < 2 do
print('a', anchorlo, anchorhi, scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
print('d', scale, (anchorhi-anchorlo)/scale)
for y=anchorlo,anchorhi,scale do
love.graphics.line(0, vy(y), 5, vy(y))
love.graphics.print(('%2.0f'):format(y), 5, vy(y)+2)
love.graphics.line(App.screen.width, vy(y), App.screen.width-5, vy(y))
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy(y)+2)
end
love.graphics.setFont(old_font)
end
{"set_mouse_cursor":562,"compute_layout":385,"draw_ticks":652,"on":1,"order_of_magnitude":573,"update_editor_box":570,"approximate":579,"sy":469,"schema1_of_y":467,"approximate_up":583,"on.text_input":521,"y_of_schema1":364,"Manifest_navigator":495,"on.initialize":506,"on.keychord_press":610,"move_candidate_to_front_of_manifest":632,"on.code_change":306,"get_definition_from_app":624,"load_from_iterator":623,"draw_cursor":639,"load_manifest":496,"get_manifest":497,"reset_manifest_navigator":621,"Menu_background_color":611,"Menu_border_color":612,"Definitions":503,"Menu_command_color":613,"new_definition":504,"add_thick_line":400,"copy_shape":396,"line_height":365,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"font":353,"num_lines_for_manifest_navigator":619,"maybe_update_key_in_definitions":529,"on.draw":565,"manifest_navigator_up":628,"manifest_navigator_down":635,"delete_definition":631,"on.mouse_release":554,"A":507,"on.update":561,"B":379,"on_text":539,"keychord_press_on_manifest_navigator":633,"Page":475,"text_input_on_manifest_navigator":634,"manifest_coord":636,"sx":544,"manifest_index":637,"vx":545,"manifest_navigator_candidates":638,"Ticks_font":594,"add_def_to_menu":640,"draw_menu_bar":641,"on.key_release":552,"on_handle":547,"Menu_highlight_color":614,"on.mouse_press":617,"parent":651,"box_height":345,"scale":7,"Manifest":494,"Surface":422,"mouse_cursor":558,"vy":546,"Mouse_cursor":559,"Viewport":604,"initialize_editor":450,"Cursor_node":172}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local lo, hi = Viewport.x, sx(App.screen.width)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---')
while (anchorhi-anchorlo)/scale < 2 do
print('a', anchorlo, anchorhi, scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
print('d', scale, (anchorhi-anchorlo)/scale)
for x=anchorlo,anchorhi,scale do
love.graphics.line(vx(x), Menu_bar_height, vx(x), Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx(x), App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, App.screen.height-15)
end
-- y axis
local lo, hi = Viewport.y, sy(App.screen.height)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---')
while (anchorhi-anchorlo)/scale < 2 do
print('a', scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
print('d', scale, (anchorhi-anchorlo)/scale)
for y=anchorlo,anchorhi,scale do
love.graphics.line(0, vy(y), 5, vy(y))
love.graphics.print(('%2.0f'):format(y), 5, vy(y)+2)
love.graphics.line(App.screen.width, vy(y), App.screen.width-5, vy(y))
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy(y)+2)
end
love.graphics.setFont(old_font)
end
{"add_def_to_menu":640,"Manifest":494,"load_manifest":496,"get_manifest":497,"Menu_background_color":611,"add_thick_line":400,"Definitions":503,"on":1,"new_definition":504,"Menu_highlight_color":614,"parent":650,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"num_lines_for_manifest_navigator":619,"move_candidate_to_front_of_manifest":632,"maybe_update_key_in_definitions":529,"draw_cursor":639,"get_definition_from_app":624,"manifest_navigator_up":628,"manifest_navigator_down":635,"reset_manifest_navigator":621,"keychord_press_on_manifest_navigator":633,"box_height":345,"text_input_on_manifest_navigator":634,"on_handle":547,"manifest_coord":636,"manifest_index":637,"on_text":539,"on.mouse_press":617,"sx":544,"vx":545,"on.mouse_release":554,"on.key_release":552,"initialize_editor":450,"scale":7,"font":353,"mouse_cursor":558,"Mouse_cursor":559,"set_mouse_cursor":562,"Surface":422,"draw_ticks":651,"on.draw":565,"y_of_schema1":364,"sy":469,"Menu_border_color":612,"Viewport":604,"update_editor_box":570,"Cursor_node":172,"vy":546,"draw_menu_bar":641,"B":379,"order_of_magnitude":573,"copy_shape":396,"approximate":579,"on.text_input":521,"schema1_of_y":467,"manifest_navigator_candidates":638,"on.update":561,"on.code_change":306,"on.keychord_press":610,"delete_definition":631,"A":507,"approximate_up":583,"Page":475,"load_from_iterator":623,"line_height":365,"Manifest_navigator":495,"Ticks_font":594,"Menu_command_color":613,"on.initialize":506,"compute_layout":385}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local lo, hi = Viewport.x, sx(App.screen.width)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---')
while (anchorhi-anchorlo)/scale < 2 do
print('a', scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
print('d', scale, (anchorhi-anchorlo)/scale)
for x=anchorlo,anchorhi,scale do
love.graphics.line(vx(x), Menu_bar_height, vx(x), Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx(x), App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, App.screen.height-15)
end
-- y axis
local lo, hi = Viewport.y, sy(App.screen.height)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---')
while (anchorhi-anchorlo)/scale < 2 do
print('a', scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
print('d', scale, (anchorhi-anchorlo)/scale)
for y=anchorlo,anchorhi,scale do
love.graphics.line(0, vy(y), 5, vy(y))
love.graphics.print(('%2.0f'):format(y), 5, vy(y)+2)
love.graphics.line(App.screen.width, vy(y), App.screen.width-5, vy(y))
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy(y)+2)
end
love.graphics.setFont(old_font)
end
{"add_def_to_menu":640,"Manifest":494,"load_manifest":496,"get_manifest":497,"Menu_background_color":611,"add_thick_line":400,"Definitions":503,"on":1,"new_definition":504,"Menu_highlight_color":614,"parent":649,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"num_lines_for_manifest_navigator":619,"move_candidate_to_front_of_manifest":632,"maybe_update_key_in_definitions":529,"draw_cursor":639,"get_definition_from_app":624,"manifest_navigator_up":628,"manifest_navigator_down":635,"reset_manifest_navigator":621,"keychord_press_on_manifest_navigator":633,"box_height":345,"text_input_on_manifest_navigator":634,"on_handle":547,"manifest_coord":636,"manifest_index":637,"on_text":539,"on.mouse_press":617,"sx":544,"vx":545,"on.mouse_release":554,"on.key_release":552,"initialize_editor":450,"scale":7,"font":353,"mouse_cursor":558,"Mouse_cursor":559,"set_mouse_cursor":562,"Surface":422,"draw_ticks":650,"on.draw":565,"y_of_schema1":364,"sy":469,"Menu_border_color":612,"Viewport":604,"update_editor_box":570,"Cursor_node":172,"vy":546,"draw_menu_bar":641,"B":379,"order_of_magnitude":573,"copy_shape":396,"approximate":579,"on.text_input":521,"schema1_of_y":467,"manifest_navigator_candidates":638,"on.update":561,"on.code_change":306,"on.keychord_press":610,"delete_definition":631,"A":507,"approximate_up":583,"Page":475,"load_from_iterator":623,"line_height":365,"Manifest_navigator":495,"Ticks_font":594,"Menu_command_color":613,"on.initialize":506,"compute_layout":385}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local lo, hi = Viewport.x, sx(App.screen.width)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
if (anchorhi-anchorlo)/scale < 5 then
scale = scale/4
elseif (anchorhi-anchorlo)/scale > 10 then
scale = scale*2.5
end
while vx(anchorlo-scale) > 0 do
anchorlo = anchorlo-scale
end
while vx(anchorhi+scale) < App.screen.width-20 do
anchorhi = anchorhi+scale
end
for x=anchorlo,anchorhi,scale do
love.graphics.line(vx(x), Menu_bar_height, vx(x), Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx(x), App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, App.screen.height-15)
end
-- y axis
local lo, hi = Viewport.y, sy(App.screen.height)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---')
while (anchorhi-anchorlo)/scale < 2 do
print('a', scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
print('d', scale, (anchorhi-anchorlo)/scale)
for y=anchorlo,anchorhi,scale do
love.graphics.line(0, vy(y), 5, vy(y))
love.graphics.print(('%2.0f'):format(y), 5, vy(y)+2)
love.graphics.line(App.screen.width, vy(y), App.screen.width-5, vy(y))
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy(y)+2)
end
love.graphics.setFont(old_font)
end
{"add_def_to_menu":640,"Manifest":494,"load_manifest":496,"get_manifest":497,"Menu_background_color":611,"add_thick_line":400,"Definitions":503,"on":1,"new_definition":504,"Menu_highlight_color":614,"parent":648,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"num_lines_for_manifest_navigator":619,"move_candidate_to_front_of_manifest":632,"maybe_update_key_in_definitions":529,"draw_cursor":639,"get_definition_from_app":624,"manifest_navigator_up":628,"manifest_navigator_down":635,"reset_manifest_navigator":621,"keychord_press_on_manifest_navigator":633,"box_height":345,"text_input_on_manifest_navigator":634,"on_handle":547,"manifest_coord":636,"manifest_index":637,"on_text":539,"on.mouse_press":617,"sx":544,"vx":545,"on.mouse_release":554,"on.key_release":552,"initialize_editor":450,"scale":7,"font":353,"mouse_cursor":558,"Mouse_cursor":559,"set_mouse_cursor":562,"Surface":422,"draw_ticks":649,"on.draw":565,"y_of_schema1":364,"sy":469,"Menu_border_color":612,"Viewport":604,"update_editor_box":570,"Cursor_node":172,"vy":546,"draw_menu_bar":641,"B":379,"order_of_magnitude":573,"copy_shape":396,"approximate":579,"on.text_input":521,"schema1_of_y":467,"manifest_navigator_candidates":638,"on.update":561,"on.code_change":306,"on.keychord_press":610,"delete_definition":631,"A":507,"approximate_up":583,"Page":475,"load_from_iterator":623,"line_height":365,"Manifest_navigator":495,"Ticks_font":594,"Menu_command_color":613,"on.initialize":506,"compute_layout":385}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local lo, hi = Viewport.x, sx(App.screen.width)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
if (anchorhi-anchorlo)/scale < 5 then
scale = scale/4
elseif (anchorhi-anchorlo)/scale > 10 then
scale = scale*2.5
end
while vx(anchorlo-scale) > 0 do
anchorlo = anchorlo-scale
end
while vx(anchorhi+scale) < App.screen.width-20 do
anchorhi = anchorhi+scale
end
for x=anchorlo,anchorhi,scale do
love.graphics.line(vx(x), Menu_bar_height, vx(x), Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx(x), App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, App.screen.height-15)
end
-- y axis
local lo, hi = Viewport.y, sy(App.screen.height)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---')
while (anchorhi-anchorlo)/scale < 2 do
print('a', scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
print('c', scale, (anchorhi-anchorlo)/scale)
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
for y=anchorlo,anchorhi,scale do
love.graphics.line(0, vy(y), 5, vy(y))
love.graphics.print(('%2.0f'):format(y), 5, vy(y)+2)
love.graphics.line(App.screen.width, vy(y), App.screen.width-5, vy(y))
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy(y)+2)
end
love.graphics.setFont(old_font)
end
{"add_def_to_menu":640,"Manifest":494,"load_manifest":496,"get_manifest":497,"Menu_background_color":611,"add_thick_line":400,"Definitions":503,"on":1,"new_definition":504,"Menu_highlight_color":614,"parent":647,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"num_lines_for_manifest_navigator":619,"move_candidate_to_front_of_manifest":632,"maybe_update_key_in_definitions":529,"draw_cursor":639,"get_definition_from_app":624,"manifest_navigator_up":628,"manifest_navigator_down":635,"reset_manifest_navigator":621,"keychord_press_on_manifest_navigator":633,"box_height":345,"text_input_on_manifest_navigator":634,"on_handle":547,"manifest_coord":636,"manifest_index":637,"on_text":539,"on.mouse_press":617,"sx":544,"vx":545,"on.mouse_release":554,"on.key_release":552,"initialize_editor":450,"scale":7,"font":353,"mouse_cursor":558,"Mouse_cursor":559,"set_mouse_cursor":562,"Surface":422,"draw_ticks":648,"on.draw":565,"y_of_schema1":364,"sy":469,"Menu_border_color":612,"Viewport":604,"update_editor_box":570,"Cursor_node":172,"vy":546,"draw_menu_bar":641,"B":379,"order_of_magnitude":573,"copy_shape":396,"approximate":579,"on.text_input":521,"schema1_of_y":467,"manifest_navigator_candidates":638,"on.update":561,"on.code_change":306,"on.keychord_press":610,"delete_definition":631,"A":507,"approximate_up":583,"Page":475,"load_from_iterator":623,"line_height":365,"Manifest_navigator":495,"Ticks_font":594,"Menu_command_color":613,"on.initialize":506,"compute_layout":385}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local lo, hi = Viewport.x, sx(App.screen.width)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
if (anchorhi-anchorlo)/scale < 5 then
scale = scale/4
elseif (anchorhi-anchorlo)/scale > 10 then
scale = scale*2.5
end
while vx(anchorlo-scale) > 0 do
anchorlo = anchorlo-scale
end
while vx(anchorhi+scale) < App.screen.width-20 do
anchorhi = anchorhi+scale
end
for x=anchorlo,anchorhi,scale do
love.graphics.line(vx(x), Menu_bar_height, vx(x), Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx(x), App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, App.screen.height-15)
end
-- y axis
local lo, hi = Viewport.y, sy(App.screen.height)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---')
while (anchorhi-anchorlo)/scale < 2 do
print('a', scale, (anchorhi-anchorlo)/scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale, (anchorhi-anchorlo)/scale)
scale = scale*2
end
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
for y=anchorlo,anchorhi,scale do
love.graphics.line(0, vy(y), 5, vy(y))
love.graphics.print(('%2.0f'):format(y), 5, vy(y)+2)
love.graphics.line(App.screen.width, vy(y), App.screen.width-5, vy(y))
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy(y)+2)
end
love.graphics.setFont(old_font)
end
{"add_def_to_menu":640,"Manifest":494,"load_manifest":496,"get_manifest":497,"Menu_background_color":611,"add_thick_line":400,"Definitions":503,"on":1,"new_definition":504,"Menu_highlight_color":614,"parent":646,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"num_lines_for_manifest_navigator":619,"move_candidate_to_front_of_manifest":632,"maybe_update_key_in_definitions":529,"draw_cursor":639,"get_definition_from_app":624,"manifest_navigator_up":628,"manifest_navigator_down":635,"reset_manifest_navigator":621,"keychord_press_on_manifest_navigator":633,"box_height":345,"text_input_on_manifest_navigator":634,"on_handle":547,"manifest_coord":636,"manifest_index":637,"on_text":539,"on.mouse_press":617,"sx":544,"vx":545,"on.mouse_release":554,"on.key_release":552,"initialize_editor":450,"scale":7,"font":353,"mouse_cursor":558,"Mouse_cursor":559,"set_mouse_cursor":562,"Surface":422,"draw_ticks":647,"on.draw":565,"y_of_schema1":364,"sy":469,"Menu_border_color":612,"Viewport":604,"update_editor_box":570,"Cursor_node":172,"vy":546,"draw_menu_bar":641,"B":379,"order_of_magnitude":573,"copy_shape":396,"approximate":579,"on.text_input":521,"schema1_of_y":467,"manifest_navigator_candidates":638,"on.update":561,"on.code_change":306,"on.keychord_press":610,"delete_definition":631,"A":507,"approximate_up":583,"Page":475,"load_from_iterator":623,"line_height":365,"Manifest_navigator":495,"Ticks_font":594,"Menu_command_color":613,"on.initialize":506,"compute_layout":385}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local lo, hi = Viewport.x, sx(App.screen.width)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
if (anchorhi-anchorlo)/scale < 5 then
scale = scale/4
elseif (anchorhi-anchorlo)/scale > 10 then
scale = scale*2.5
end
while vx(anchorlo-scale) > 0 do
anchorlo = anchorlo-scale
end
while vx(anchorhi+scale) < App.screen.width-20 do
anchorhi = anchorhi+scale
end
for x=anchorlo,anchorhi,scale do
love.graphics.line(vx(x), Menu_bar_height, vx(x), Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx(x), App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, App.screen.height-15)
end
-- y axis
local lo, hi = Viewport.y, sy(App.screen.height)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
print('---')
while (anchorhi-anchorlo)/scale < 2 do
print('a', scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale)
scale = scale*2
end
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
for y=anchorlo,anchorhi,scale do
love.graphics.line(0, vy(y), 5, vy(y))
love.graphics.print(('%2.0f'):format(y), 5, vy(y)+2)
love.graphics.line(App.screen.width, vy(y), App.screen.width-5, vy(y))
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy(y)+2)
end
love.graphics.setFont(old_font)
end
{"add_def_to_menu":640,"Manifest":494,"load_manifest":496,"get_manifest":497,"Menu_background_color":611,"add_thick_line":400,"Definitions":503,"on":1,"new_definition":504,"Menu_highlight_color":614,"parent":645,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"num_lines_for_manifest_navigator":619,"move_candidate_to_front_of_manifest":632,"maybe_update_key_in_definitions":529,"draw_cursor":639,"get_definition_from_app":624,"manifest_navigator_up":628,"manifest_navigator_down":635,"reset_manifest_navigator":621,"keychord_press_on_manifest_navigator":633,"box_height":345,"text_input_on_manifest_navigator":634,"on_handle":547,"manifest_coord":636,"manifest_index":637,"on_text":539,"on.mouse_press":617,"sx":544,"vx":545,"on.mouse_release":554,"on.key_release":552,"initialize_editor":450,"scale":7,"font":353,"mouse_cursor":558,"Mouse_cursor":559,"set_mouse_cursor":562,"Surface":422,"draw_ticks":646,"on.draw":565,"y_of_schema1":364,"sy":469,"Menu_border_color":612,"Viewport":604,"update_editor_box":570,"Cursor_node":172,"vy":546,"draw_menu_bar":641,"B":379,"order_of_magnitude":573,"copy_shape":396,"approximate":579,"on.text_input":521,"schema1_of_y":467,"manifest_navigator_candidates":638,"on.update":561,"on.code_change":306,"on.keychord_press":610,"delete_definition":631,"A":507,"approximate_up":583,"Page":475,"load_from_iterator":623,"line_height":365,"Manifest_navigator":495,"Ticks_font":594,"Menu_command_color":613,"on.initialize":506,"compute_layout":385}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local lo, hi = Viewport.x, sx(App.screen.width)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
if (anchorhi-anchorlo)/scale < 5 then
scale = scale/4
elseif (anchorhi-anchorlo)/scale > 10 then
scale = scale*2.5
end
while vx(anchorlo-scale) > 0 do
anchorlo = anchorlo-scale
end
while vx(anchorhi+scale) < App.screen.width-20 do
anchorhi = anchorhi+scale
end
for x=anchorlo,anchorhi,scale do
love.graphics.line(vx(x), Menu_bar_height, vx(x), Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx(x), App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, App.screen.height-15)
end
-- y axis
local lo, hi = Viewport.y, sy(App.screen.height)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
while (anchorhi-anchorlo)/scale < 2 do
print('a', scale)
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
print('b', scale)
scale = scale*2
end
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
for y=anchorlo,anchorhi,scale do
love.graphics.line(0, vy(y), 5, vy(y))
love.graphics.print(('%2.0f'):format(y), 5, vy(y)+2)
love.graphics.line(App.screen.width, vy(y), App.screen.width-5, vy(y))
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy(y)+2)
end
love.graphics.setFont(old_font)
end
{"add_def_to_menu":640,"Manifest":494,"load_manifest":496,"get_manifest":497,"Menu_background_color":611,"add_thick_line":400,"Definitions":503,"on":1,"new_definition":504,"Menu_highlight_color":614,"parent":643,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"num_lines_for_manifest_navigator":619,"move_candidate_to_front_of_manifest":632,"maybe_update_key_in_definitions":529,"draw_cursor":639,"get_definition_from_app":624,"manifest_navigator_up":628,"manifest_navigator_down":635,"reset_manifest_navigator":621,"keychord_press_on_manifest_navigator":633,"box_height":345,"text_input_on_manifest_navigator":634,"on_handle":547,"manifest_coord":636,"manifest_index":637,"on_text":539,"on.mouse_press":617,"sx":544,"vx":545,"on.mouse_release":554,"on.key_release":552,"initialize_editor":450,"scale":7,"font":353,"mouse_cursor":558,"Mouse_cursor":559,"set_mouse_cursor":562,"Surface":422,"draw_ticks":645,"on.draw":565,"y_of_schema1":364,"sy":469,"Menu_border_color":612,"Viewport":604,"update_editor_box":570,"Cursor_node":172,"vy":546,"draw_menu_bar":641,"B":379,"order_of_magnitude":573,"copy_shape":396,"approximate":579,"on.text_input":521,"schema1_of_y":467,"manifest_navigator_candidates":638,"on.update":561,"on.code_change":306,"on.keychord_press":610,"delete_definition":631,"A":507,"approximate_up":583,"Page":475,"load_from_iterator":623,"line_height":365,"Manifest_navigator":495,"Ticks_font":594,"Menu_command_color":613,"on.initialize":506,"compute_layout":385}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local lo, hi = Viewport.x, sx(App.screen.width)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
if (anchorhi-anchorlo)/scale < 5 then
scale = scale/4
elseif (anchorhi-anchorlo)/scale > 10 then
scale = scale*2.5
end
while vx(anchorlo-scale) > 0 do
anchorlo = anchorlo-scale
end
while vx(anchorhi+scale) < App.screen.width-20 do
anchorhi = anchorhi+scale
end
for x=anchorlo,anchorhi,scale do
love.graphics.line(vx(x), Menu_bar_height, vx(x), Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx(x), App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, App.screen.height-15)
end
-- y axis
local lo, hi = Viewport.y, sy(App.screen.height)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
while (anchorhi-anchorlo)/scale < 2 do
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 do
scale = scale*2
end
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
for y=anchorlo,anchorhi,scale do
love.graphics.line(0, vy(y), 5, vy(y))
love.graphics.print(('%2.0f'):format(y), 5, vy(y)+2)
love.graphics.line(App.screen.width, vy(y), App.screen.width-5, vy(y))
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy(y)+2)
end
love.graphics.setFont(old_font)
end
{"add_def_to_menu":640,"Manifest":494,"load_manifest":496,"get_manifest":497,"compute_layout":385,"add_thick_line":400,"Menu_border_color":612,"on":1,"Menu_command_color":613,"Menu_highlight_color":614,"parent":643,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"num_lines_for_manifest_navigator":619,"move_candidate_to_front_of_manifest":632,"maybe_update_key_in_definitions":529,"draw_cursor":639,"get_definition_from_app":624,"load_from_iterator":623,"manifest_navigator_down":635,"delete_definition":631,"keychord_press_on_manifest_navigator":633,"box_height":345,"text_input_on_manifest_navigator":634,"on_handle":547,"on.code_change":306,"manifest_index":637,"manifest_navigator_candidates":638,"on.mouse_press":617,"sx":544,"vx":545,"on.mouse_release":554,"on.key_release":552,"initialize_editor":450,"scale":7,"font":353,"mouse_cursor":558,"Mouse_cursor":559,"set_mouse_cursor":562,"Surface":422,"draw_ticks":644,"on.draw":565,"Menu_background_color":611,"sy":469,"A":507,"Viewport":604,"update_editor_box":570,"line_height":365,"order_of_magnitude":573,"on_text":539,"B":379,"draw_menu_bar":641,"manifest_coord":636,"approximate":579,"reset_manifest_navigator":621,"schema1_of_y":467,"new_definition":504,"on.update":561,"Definitions":503,"on.keychord_press":610,"manifest_navigator_up":628,"vy":546,"approximate_up":583,"Page":475,"on.text_input":521,"copy_shape":396,"Manifest_navigator":495,"Ticks_font":594,"Cursor_node":172,"on.initialize":506,"y_of_schema1":364}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local lo, hi = Viewport.x, sx(App.screen.width)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
if (anchorhi-anchorlo)/scale < 5 then
scale = scale/4
elseif (anchorhi-anchorlo)/scale > 10 then
scale = scale*2.5
end
while vx(anchorlo-scale) > 0 do
anchorlo = anchorlo-scale
end
while vx(anchorhi+scale) < App.screen.width-20 do
anchorhi = anchorhi+scale
end
for x=anchorlo,anchorhi,scale do
love.graphics.line(vx(x), Menu_bar_height, vx(x), Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx(x), App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, App.screen.height-15)
end
-- y axis
local lo, hi = Viewport.y, sy(App.screen.height)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
while (anchorhi-anchorlo)/scale < 2 then
scale = scale/2
end
while (anchorhi-anchorlo)/scale > 4 then
scale = scale*2
end
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
for y=anchorlo,anchorhi,scale do
love.graphics.line(0, vy(y), 5, vy(y))
love.graphics.print(('%2.0f'):format(y), 5, vy(y)+2)
love.graphics.line(App.screen.width, vy(y), App.screen.width-5, vy(y))
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy(y)+2)
end
love.graphics.setFont(old_font)
end
{"add_def_to_menu":640,"Manifest":494,"load_manifest":496,"get_manifest":497,"compute_layout":385,"add_thick_line":400,"Menu_border_color":612,"on":1,"Menu_command_color":613,"Menu_highlight_color":614,"parent":642,"add_hotkey_to_menu":616,"draw_manifest_navigator":618,"num_lines_for_manifest_navigator":619,"move_candidate_to_front_of_manifest":632,"maybe_update_key_in_definitions":529,"draw_cursor":639,"get_definition_from_app":624,"load_from_iterator":623,"manifest_navigator_down":635,"delete_definition":631,"keychord_press_on_manifest_navigator":633,"box_height":345,"text_input_on_manifest_navigator":634,"on_handle":547,"on.code_change":306,"manifest_index":637,"manifest_navigator_candidates":638,"on.mouse_press":617,"sx":544,"vx":545,"on.mouse_release":554,"on.key_release":552,"initialize_editor":450,"scale":7,"font":353,"mouse_cursor":558,"Mouse_cursor":559,"set_mouse_cursor":562,"Surface":422,"draw_ticks":643,"on.draw":565,"Menu_background_color":611,"sy":469,"A":507,"Viewport":604,"update_editor_box":570,"line_height":365,"order_of_magnitude":573,"on_text":539,"B":379,"draw_menu_bar":641,"manifest_coord":636,"approximate":579,"reset_manifest_navigator":621,"schema1_of_y":467,"new_definition":504,"on.update":561,"Definitions":503,"on.keychord_press":610,"manifest_navigator_up":628,"vy":546,"approximate_up":583,"Page":475,"on.text_input":521,"copy_shape":396,"Manifest_navigator":495,"Ticks_font":594,"Cursor_node":172,"on.initialize":506,"y_of_schema1":364}
draw_ticks = function()
local old_font = love.graphics.getFont()
love.graphics.setFont(Ticks_font)
love.graphics.setColor(0.6,0.6,0.6)
-- x axis
local lo, hi = Viewport.x, sx(App.screen.width)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
if (anchorhi-anchorlo)/scale < 5 then
scale = scale/4
elseif (anchorhi-anchorlo)/scale > 10 then
scale = scale*2.5
end
while vx(anchorlo-scale) > 0 do
anchorlo = anchorlo-scale
end
while vx(anchorhi+scale) < App.screen.width-20 do
anchorhi = anchorhi+scale
end
for x=anchorlo,anchorhi,scale do
love.graphics.line(vx(x), Menu_bar_height, vx(x), Menu_bar_height+5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, Menu_bar_height+5)
love.graphics.line(vx(x), App.screen.height, vx(x), App.screen.height-5)
love.graphics.print(('%2.0f'):format(x), vx(x)+2, App.screen.height-15)
end
-- y axis
local lo, hi = Viewport.y, sy(App.screen.height)
local anchorhi, scale = approximate(hi, order_of_magnitude(hi-lo))
local anchorlo = approximate_up(lo, order_of_magnitude(hi-lo))
if (anchorhi-anchorlo)/scale < 2 then
scale = scale/2
elseif (anchorhi-anchorlo)/scale > 4 then
scale = scale*2
end
while vy(anchorlo-scale) > Menu_bar_height+20 do
anchorlo = anchorlo-scale
end
while vy(anchorhi+scale) < App.screen.height-20 do
anchorhi = anchorhi+scale
end
for y=anchorlo,anchorhi,scale do
love.graphics.line(0, vy(y), 5, vy(y))
love.graphics.print(('%2.0f'):format(y), 5, vy(y)+2)
love.graphics.line(App.screen.width, vy(y), App.screen.width-5, vy(y))
love.graphics.print(('%2.0f'):format(y), App.screen.width-20, vy(y)+2)
end
love.graphics.setFont(old_font)
end