flatland.utils.graphics_layer module¶

class flatland.utils.graphics_layer.GraphicsLayer[source]¶

Bases: object

adapt_color(color, lighten=False)[source]¶
begin_frame()[source]¶
build_background_map(dTargets)[source]¶
clf()[source]¶
endFrame()[source]¶
get_cmap(*args, **kwargs)[source]¶
get_image()[source]¶
idle(seconds=1e-05)[source]¶

process any display events eg redraw, resize. Return only after the given number of seconds, ie idle / loop until that number.

open_window()[source]¶
pause(seconds=1e-05)[source]¶

deprecated

plot(*args, **kwargs)[source]¶
prettify(*args, **kwargs)[source]¶
resize(env)[source]¶
save_image(filename)[source]¶
scatter(*args, **kwargs)[source]¶
set_agent_at(iAgent, row, col, iDirIn, iDirOut, isSelected=False, rail_grid=None, show_debug=False, clear_debug_text=True)[source]¶
set_cell_occupied(iAgent, row, col)[source]¶
set_rail_at(row, col, binTrans, iTarget=None, isSelected=False, rail_grid=None, num_agents=None)[source]¶

Set the rail at cell (row, col) to have transitions binTrans. The target argument can contain the index of the agent to indicate that agent’s target is at that cell, so that a station can be rendered in the static rail layer.

show(block=False)[source]¶
text(*args, **kwargs)[source]¶