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

Method shift_window

src/laybasic/laybasic/layLayoutViewBase.cc:4106–4120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4104}
4105
4106void
4107LayoutViewBase::shift_window (double f, double dx, double dy)
4108{
4109 db::DBox b = mp_canvas->viewport ().box ();
4110
4111 db::DPoint s = mp_canvas->viewport ().global_trans ().inverted () * db::DPoint (dx, dy);
4112 db::DPoint c = b.center () + db::DVector (b.width () * s.x (), b.height () * s.y ());
4113
4114 double w = b.width () * f;
4115 double h = b.height () * f;
4116
4117 db::DVector d (w * 0.5, h * 0.5);
4118
4119 zoom_box (db::DBox (c - d, c + d));
4120}
4121
4122void
4123LayoutViewBase::goto_window (const db::DPoint &p, double s)

Callers

nothing calls this directly

Calls 8

global_transMethod · 0.80
centerMethod · 0.80
yMethod · 0.80
boxMethod · 0.45
invertedMethod · 0.45
widthMethod · 0.45
xMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected