2023-10-26 00:46:03 +01:00
|
|
|
B = function(skip_updating_screen_top_for)
|
2023-10-26 01:48:00 +01:00
|
|
|
print('B', skip_updating_screen_top_for)
|
2023-10-25 15:45:09 +01:00
|
|
|
-- recompute various aspects based on the current viewport settings
|
|
|
|
for _,obj in ipairs(Surface) do
|
|
|
|
if obj.type == 'line' then
|
|
|
|
obj.zdata = {}
|
|
|
|
for i=1,#obj.data,2 do
|
|
|
|
table.insert(obj.zdata, vx(obj.data[i]))
|
|
|
|
table.insert(obj.zdata, vy(obj.data[i+1]))
|
|
|
|
end
|
|
|
|
elseif obj.type == 'bezier' then
|
|
|
|
zdata = {}
|
|
|
|
for i=1,#obj.data,2 do
|
|
|
|
table.insert(zdata, vx(obj.data[i]))
|
|
|
|
table.insert(zdata, vy(obj.data[i+1]))
|
|
|
|
end
|
|
|
|
obj.zdata = love.math.newBezierCurve(zdata):render()
|
|
|
|
elseif obj.type == 'text' then
|
|
|
|
if obj.w then
|
2023-10-26 00:46:03 +01:00
|
|
|
update_editor_box(obj, skip_updating_screen_top_for)
|
2023-10-25 15:45:09 +01:00
|
|
|
else
|
|
|
|
obj.text = love.graphics.newText(love.graphics.getFont(), obj.data)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2023-10-26 01:48:00 +01:00
|
|
|
print('end B', skip_updating_screen_top_for)
|
2023-10-26 00:46:03 +01:00
|
|
|
end
|