Transformation of the item.
public LeadMatrix Transform { get; set; } Public Property Transform() As LeadMatrixGetSet
public:property LeadMatrix^ Transform{LeadMatrix^ get()void set(LeadMatrix^ value)}
The transformation of the item. Default value is Identity.
Transform will be used by ViewLayout during the calculation. The rectangle from 0,0 to ImageSize is multiplied by this value apply custom translation, scale and rotation on the item.
Modifying the state values will update this matrix automatically and setting the value of Transform manually will reset the state values to their default values. For more information, for more information, refer Image Viewer Transformation.
For more information, refer Image Viewer Items.
using Leadtools;using Leadtools.Controls;using Leadtools.Codecs;using Leadtools.Drawing;using LeadtoolsExamples.Common;using Leadtools.ImageProcessing;using Leadtools.ImageProcessing.Color;public void ImageViewerTransform_Example(int dy, LeadPoint position){double total = _imageViewer.GetItemViewBounds(_imageViewer.ActiveItem, ImageViewerItemPart.Item, false).Height;double factor;if (total > 0)factor = 1.0 - (dy * 2.0) / total;elsefactor = 1.0;// Get the origin in image coordinatevar origin = _imageViewer.ConvertPoint(_imageViewer.ActiveItem, ImageViewerCoordinateType.Control, ImageViewerCoordinateType.Image, position).ToLeadPointD();// Convert it to whatever the current transform isorigin = _imageViewer.ActiveItem.Transform.Transform(origin);var transform = LeadMatrix.Identity;transform.ScaleAt(1 / factor, 1 / factor, origin.X, origin.Y);_imageViewer.ActiveItem.Transform = LeadMatrix.Multiply(_imageViewer.ActiveItem.Transform, transform);}
Imports LeadtoolsImports Leadtools.ControlsImports Leadtools.CodecsImports Leadtools.DrawingImports Leadtools.ImageProcessingImports Leadtools.ImageProcessing.ColorImports LeadtoolsControlsExamples.LeadtoolsExamples.CommonPublic Sub ImageViewerTransform_Example(ByVal dy As Integer, ByVal position As LeadPoint)Dim total As Double = _imageViewer.GetItemViewBounds(_imageViewer.ActiveItem, ImageViewerItemPart.Item, False).HeightDim factor As DoubleIf total > 0 Thenfactor = 1.0 - (dy * 2.0) / totalElsefactor = 1.0End If' Get the origin in image coordinateDim origin As LeadPointD = _imageViewer.ConvertPoint(_imageViewer.ActiveItem, ImageViewerCoordinateType.Control,ImageViewerCoordinateType.Image, position).ToLeadPointD()' Convert it to whatever the current transform isorigin = _imageViewer.ActiveItem.Transform.Transform(origin)Dim transform As LeadMatrix = LeadMatrix.Identitytransform.ScaleAt(1 / factor, 1 / factor, origin.X, origin.Y)_imageViewer.ActiveItem.Transform = LeadMatrix.Multiply(_imageViewer.ActiveItem.Transform, transform)End Sub
|
Products |
Support |
Feedback: Transform Property (ImageViewerItem) - Leadtools.Controls |
Introduction |
Help Version 19.0.2017.6.20
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.