add jpg library, export as jpg, export animation frames, add pressure support on mac

This commit is contained in:
2017-05-16 21:55:51 +01:00
parent a5c79d5ad8
commit c987b19c83
22 changed files with 11025 additions and 28 deletions

View File

@@ -11,20 +11,22 @@ void App::resize(float w, float h)
main->update(w , h, zoom);
}
bool App::mouse_down(int button, float x, float y)
bool App::mouse_down(int button, float x, float y, float pressure)
{
MouseEvent e;
e.m_type = button ? kEventType::MouseDownR : kEventType::MouseDownL;
e.m_pos = { x / zoom, y / zoom };
e.m_pressure = pressure;
auto ret = layout[main_id]->on_event(&e);
layout[main_id]->update();
return ret == kEventResult::Consumed;
}
bool App::mouse_move(float x, float y)
bool App::mouse_move(float x, float y, float pressure)
{
MouseEvent e;
e.m_type = kEventType::MouseMove;
e.m_pos = { x / zoom, y / zoom };
e.m_pressure = pressure;
kEventResult ret = kEventResult::Available;
if (auto* main = layout[main_id])
ret = main->on_event(&e);