Leadtools.Controls Namespace > ImageViewer Object : UpdateTransform Method |
function Leadtools.Controls.ImageViewer.updateTransform()
This method is called internally by the viewer when the transformation matrices used to palce and render the view and items need to be updated. For example when a new item is added to Items, when Zoom is called or when the size of the viewer is changed among many more cases.
Inside this method, the viewer will perform the following:
Check if updating the transform is enabled and the user did not disable it by calling BeginTransform (the value of CanTransform is true), if not, it will exit immediatly.
Calls the ImageViewerViewLayout.UpdateTransform
method of the current view layout object in ViewLayout. The view layout will then re-order and re-size the items in the desired fashionFrom this information, the viewer will re-calculate the view size and set it ViewSize and then update the scrollbars position and size based on ScrollMode
All the transformation matrices for the view and the items are updated. This includes the view matrix stored in ViewTransform and as well the item various matrices which can be obtained using GetItemTransform or GetItemImageTransform.
Try to raise the TransformChanged event
Invalidates the view area and start a new render cycle to update the surface with the new view and items.
For more information, refer to Image Viewer Items, Image Viewer Transformation, Image Viewer Bounds and Transform and Image Viewer Layouts.