MCPcopy Create free account
hub / github.com/KLayout/klayout / zoom_by

Method zoom_by

src/laybasic/laybasic/layLayoutViewBase.cc:4093–4104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4091}
4092
4093void
4094LayoutViewBase::zoom_by (double f)
4095{
4096 db::DBox b = mp_canvas->viewport ().box ();
4097
4098 db::DPoint c = b.center ();
4099 if (mp_canvas->mouse_in_window ()) {
4100 c = mp_canvas->mouse_position_um ();
4101 }
4102
4103 zoom_box ((b.moved (db::DPoint () - c) * f).moved (c - db::DPoint ()));
4104}
4105
4106void
4107LayoutViewBase::shift_window (double f, double dx, double dy)

Callers

nothing calls this directly

Calls 3

centerMethod · 0.80
boxMethod · 0.45
movedMethod · 0.45

Tested by

no test coverage detected