Transformation matrix used by the floater image of this item.
public LeadMatrix FloaterTransform { get; set; }
Public Property FloaterTransform() As LeadMatrix
Get
Set
public:
property LeadMatrix^ FloaterTransform
{
LeadMatrix^ get()
void set(LeadMatrix^ value)
}
The transformation matrix used by the floater image of this item. Default value is Identity.
Use this transform to translate, scale or rotate the floater image. ImageViewerFloaterInteractiveMode will update this value when the user clicks and drags on the floater image.
Changing the value of this property will fire the ItemChanged event with ImageViewerItemChangedReason.FloaterTransform.
using Leadtools;
using Leadtools.Controls;
using Leadtools.Codecs;
using Leadtools.Drawing;
using LeadtoolsExamples.Common;
using Leadtools.ImageProcessing;
using Leadtools.ImageProcessing.Color;
var item = _imageViewer.Items[0];
if (item == null)
return;
if (item.Floater == null)
{
var xForm = RasterRegionXForm.Default;
using (var image = item.Image.Clone())
{
var width = image.ImageWidth / 2;
var height = image.ImageHeight / 2;
image.AddRectangleToRegion(xForm, new LeadRect(width, height, width, height), RasterRegionCombineMode.Set);
xForm = RasterRegionXForm.Default;
xForm.ViewPerspective = RasterViewPerspective.TopLeft;
var rc = image.GetRegionBounds(xForm);
var command = new CopyRectangleCommand(rc, RasterMemoryFlags.Conventional);
command.Run(image);
var floater = command.DestinationImage;
rc = image.RectangleFromImage(RasterViewPerspective.TopLeft, rc);
if (floater != null)
{
xForm.ViewPerspective = RasterViewPerspective.TopLeft;
var regionData = RasterRegionConverter.GetGdiPlusRegionData(image, xForm);
xForm.ViewPerspective = RasterViewPerspective.TopLeft;
xForm.XOffset -= rc.Left;
xForm.YOffset -= rc.Top;
}
floater.MakeRegionEmpty();
var transform = item.FloaterTransform;
transform.Translate(-floater.ImageWidth, -floater.ImageHeight);
item.FloaterTransform = transform;
item.Floater = floater;
}
}
else
{
var floater = item.Floater;
var transform = item.FloaterTransform;
transform.Translate(-1, -1);
item.FloaterTransform = transform;
}
Imports Leadtools
Imports Leadtools.Controls
Imports Leadtools.Codecs
Imports Leadtools.Drawing
Imports Leadtools.ImageProcessing
Imports Leadtools.ImageProcessing.Color
Imports LeadtoolsControlsExamples.LeadtoolsExamples.Common
Dim item As ImageViewerItem = _imageViewer.Items(0)
If item Is Nothing Then
Return
End If
If item.Floater Is Nothing Then
Dim xForm As RasterRegionXForm = RasterRegionXForm.Default
Using image As RasterImage = item.Image.Clone()
Dim width As Integer = image.ImageWidth \ 2
Dim height As Integer = image.ImageHeight \ 2
image.AddRectangleToRegion(xForm, New LeadRect(width, height, width, height), RasterRegionCombineMode.Set)
xForm = RasterRegionXForm.Default
xForm.ViewPerspective = RasterViewPerspective.TopLeft
Dim rc As LeadRect = image.GetRegionBounds(xForm)
Dim command As New CopyRectangleCommand(rc, RasterMemoryFlags.Conventional)
command.Run(image)
Dim floater As RasterImage = command.DestinationImage
rc = image.RectangleFromImage(RasterViewPerspective.TopLeft, rc)
If Not floater Is Nothing Then
xForm.ViewPerspective = RasterViewPerspective.TopLeft
Dim regionData As System.Drawing.Drawing2D.RegionData = RasterRegionConverter.GetGdiPlusRegionData(image, xForm)
xForm.ViewPerspective = RasterViewPerspective.TopLeft
xForm.XOffset -= rc.Left
xForm.YOffset -= rc.Top
End If
floater.MakeRegionEmpty()
Dim transform As LeadMatrix = item.FloaterTransform
transform.Translate(-floater.ImageWidth, -floater.ImageHeight)
item.FloaterTransform = transform
item.Floater = floater
End Using
Else
Dim floater As RasterImage = item.Floater
Dim transform As LeadMatrix = item.FloaterTransform
transform.Translate(-1, -1)
item.FloaterTransform = transform
End If
Products |
Support |
Feedback: FloaterTransform 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.