MCPcopy Create free account
hub / github.com/comaps/comaps / OnMove

Method OnMove

libs/drape_frontend/user_event_stream.cpp:390–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390bool UserEventStream::OnMove(ref_ptr<MoveEvent> moveEvent)
391{
392 double const factorX = moveEvent->GetFactorX();
393 double const factorY = moveEvent->GetFactorY();
394
395 ScreenBase screen;
396 GetTargetScreen(screen);
397 auto const & rect = screen.PixelRectIn3d();
398 screen.Move(factorX * rect.SizeX(), -factorY * rect.SizeY());
399
400 ShrinkAndScaleInto(screen, df::GetWorldRect());
401
402 return SetScreen(screen, moveEvent->IsAnim());
403}
404
405bool UserEventStream::OnSetAnyRect(ref_ptr<SetAnyRectEvent> anyRectEvent)
406{

Callers

nothing calls this directly

Calls 8

ShrinkAndScaleIntoFunction · 0.85
GetWorldRectFunction · 0.85
GetFactorXMethod · 0.80
GetFactorYMethod · 0.80
SizeXMethod · 0.80
SizeYMethod · 0.80
MoveMethod · 0.45
IsAnimMethod · 0.45

Tested by

no test coverage detected