←Select platform

UpdateTransform Method


Re-calculates the transformation matrices and update the view layout.

public void UpdateTransform() 
   void UpdateTransform() 

This method is called internally by the viewer when the transformation matrices used to place 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 fashion

  • From 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.


Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.