ZFFramework
Loading...
Searching...
No Matches
ZFUIViewPositionMap.h File Reference

map view's position to screen coordinate More...

#include "ZFUIView.h"

Go to the source code of this file.

Functions

ZFUIPoint ZFUIViewPositionMap (ZFUIView *view, const ZFUIPoint &localPos=(ZFUIPointZero()))
 map view's position to screen coordinate
ZFUIRect ZFUIViewPositionOnScreen (ZFUIView *view)
 util to ZFUIViewPositionMap to calculate view's position on screen

Detailed Description

map view's position to screen coordinate

Function Documentation

◆ ZFUIViewPositionMap()

ZFUIPoint ZFUIViewPositionMap ( ZFUIView * view,
const ZFUIPoint & localPos = (ZFUIPointZero()) )
extern

map view's position to screen coordinate

the localPos is relative to view's left top origin, without applying view's scale/translate/rotate

Note
(ZFTAG_LIMITATION) result value would be invalid until whole layout step finished, due to impl's limitation, we are unable to be notified which time the layout step would finish, so the best solution to check valid position is using delay, use zfpost or ZFTimerOnce is recommended

◆ ZFUIViewPositionOnScreen()

ZFUIRect ZFUIViewPositionOnScreen ( ZFUIView * view)
extern

util to ZFUIViewPositionMap to calculate view's position on screen

note the view must not have scale or rotation, or the result may be invalid