Transformation of the item.
Object.defineProperty(ImageViewerItem.prototype, 'transform',
get: function(),
set: function(value)
)
transform: LeadMatrix;
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.
function ImageViewer_Transform(dy, position) {
var total = this._imageViewer.getItemViewBounds(this._imageViewer.activeItem, lt.Controls.ImageViewerItemPart.item, false).height;
var factor;
if (total > 0)
factor = 1.0 - (dy * 2.0) / total;
else
factor = 1.0;
// Get the origin in image coordinate
var origin = this._imageViewer.convertPoint(this._imageViewer.activeItem, lt.Controls.ImageViewerCoordinateType.control, lt.Controls.ImageViewerCoordinateType.image, position);
// Convert it to whatever the current transform is
origin = this._imageViewer.activeItem.transform.transformPoint(origin);
var transform = lt.LeadMatrix.identity;
transform.scaleAt(1 / factor, 1 / factor, origin.x, origin.y);
this._imageViewer.activeItem.transform = lt.LeadMatrix.multiply(this._imageViewer.activeItem.transform, transform);
};
Products |
Support |
Feedback: transform Property (ImageViewerItem) - Leadtools.Controls |
Introduction |
Help Version 19.0.2017.3.21
|
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.