
Thu, 01/20/2005 - 11:33
Forums:
hi,
is it possible to zoom the view from the point different from the centre? zoom function of v3d_view doesn't contain a parameter of this zooming origin. is there some way how it can be set?
best regards,
adrian
hi,
is it possible to zoom the view from the point different from the centre? zoom function of v3d_view doesn't contain a parameter of this zooming origin. is there some way how it can be set?
best regards,
adrian
Wed, 02/09/2005 - 13:27
trick:
1. pan from the zoom-centre-point to the centre of window,
2. zoom,
3. pan back from the centre of window to the the zoom-centre-point.
GetClientRect (o_cl_rect);
GetView()->SetImmediateUpdate (false);
GetView()->Pan (o_cl_rect.Width()/2.0-pt.x, pt.y-o_cl_rect.Height()/2.0);
GetView()->Zoom(...);
GetView()->SetImmediateUpdate (true);
GetView()->Pan (pt.x-o_cl_rect.Width()/2.0, o_cl_rect.Height()/2.0-pt.y);