MCPcopy Create free account
hub / github.com/cmauri/eviacam / MovePointerAbs

Method MovePointerAbs

wxutil/mousecontrol.cpp:263–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263void CMouseControl::MovePointerAbs (float x, float y)
264{
265// OnDisplayChanged ();
266
267 int iX, iY;
268 float fisX, fisY, dx, dy;
269
270 Virt2Fis (x, y, fisX, fisY);
271
272 GetPointerLocation (iX, iY);
273 dx= fisX - (float) iX;
274 dy= fisY - (float) iY;
275
276 // Low-pass filter
277 dx= dx * (1.0f - m_actualMotionWeight) + m_dxant * m_actualMotionWeight;
278 dy= dy * (1.0f - m_actualMotionWeight) + m_dyant * m_actualMotionWeight;
279 m_dxant= dx; m_dyant= dy;
280
281 // Map to screen coordinates
282 iX= iX + (int) dx;
283 iY= iY + (int) dy;
284
285 EnforceWorkingAreaLimits (iX, iY);
286 DoMovePointerAbs (iX, iY);
287}
288
289float CMouseControl::MovePointerRel (float dx, float dy, int* dxRes, int* dyRes)
290{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected