MGL_wmCoordGlobalToLocal

Converts between local and global coordinates.

Declaration

void MGLAPI MGL_wmCoordGlobalToLocal(
window_t *wnd,
int x,
int y,
int *xLocal,
int *yLocal)

Prototype In

mgraph.h

Parameters

wnd | the window
x | X coordinate in global space
y | Y coordinate in global space
xLocal | variable to store X coordinate in local space
yLocal | variable to store X coordinate in local space

Description

This function converts point expressed in global coordinates (i.e. relative to device context's upper left corner) into coordinates relative to given window's upper left corner.

wnd may be a window arbitrary deep in windows hierarchy, MGL_wmCoordGlobalToLocal descends the hierarchy recursively.

See Also

MGL_wmCoordGlobalToLocal, MGL_wmSetWindowPosition

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com