Gets or sets the floater image.
public virtual RasterImage FloaterImage { get; set; } <BrowsableAttribute(False)>Public Overridable Property FloaterImage As Leadtools.RasterImage
[BrowsableAttribute(false)]public:virtual property Leadtools.RasterImage^ FloaterImage {Leadtools.RasterImage^ get();void set ( Leadtools.RasterImage^ );}
A Leadtools.RasterImage object that represents the current floater image.
The RasterImageViewer supports a floater image that can be dragged with the mouse when the value of the InteractiveMode is set to RasterViewerInteractiveMode.Floater
If the value of the floater image has a region, then only the region will be painted. This region can be animated by setting the value of the AnimateFloater property to true.
The position of the floater can be manipulated with the FloaterPosition property.
You can use the FloaterVisible property to control whether to view the floater.
This sample lets you create a floater, move the floater, and combine the floater with the image.
using Leadtools.WinForms;using Leadtools;using Leadtools.Codecs;using Leadtools.ImageProcessing.Color;using Leadtools.Drawing;private void viewer_FloaterInteractiveModeEnded(object sender, EventArgs e){// an interactive mode is done. check if its drawing a region// if so, convert the region to a floater and set the interactive// mode so that we can drag the floaterRasterImageViewer viewer = sender as RasterImageViewer;if (viewer.InteractiveMode == RasterViewerInteractiveMode.Region){viewer.EnableTimer = true;viewer.RegionToFloater();viewer.FloaterVisible = true;viewer.AnimateFloater = true;viewer.InteractiveMode = RasterViewerInteractiveMode.Floater;// delete the region since we do not need it anymoreviewer.Image.MakeRegionEmpty();MessageBox.Show("Move the floater around, double click anywhere on the viewer to combine it with the image");}}private void viewer_DoubleClick(object sender, EventArgs e){// check if the interactive mode is Floater, if so,// combine the floater with the image.RasterImageViewer viewer = sender as RasterImageViewer;if (viewer.InteractiveMode == RasterViewerInteractiveMode.Floater){viewer.InteractiveMode = RasterViewerInteractiveMode.None;viewer.CombineFloater(true, ImageProcessing.CombineFastCommandFlags.SourceCopy);// get rid of the floater since we do not need it anymoreviewer.FloaterImage = null;MessageBox.Show("The floater has been combined with the image");}}public void RasterImageViewer_FloaterImage(RasterImageViewer viewer){// hook into the viewer InteractiveModeEnded and DoubleClick eventsviewer.InteractiveModeEnded += new EventHandler(viewer_FloaterInteractiveModeEnded);viewer.DoubleClick += new EventHandler(viewer_DoubleClick);// first set the interactive mode to draw a freehand regionviewer.InteractiveRegionType = RasterViewerInteractiveRegionType.Freehand;viewer.InteractiveRegionCombineMode = RasterRegionCombineMode.Set;viewer.InteractiveMode = RasterViewerInteractiveMode.Region;MessageBox.Show("Draw a freehand region on the image");}
Imports Leadtools.WinFormsImports LeadtoolsImports Leadtools.CodecsImports Leadtools.ImageProcessing.ColorImports Leadtools.DrawingPrivate Sub imageViewer_InteractiveModeEnded(ByVal sender As Object, ByVal e As EventArgs)' an interactive mode is done. check if its drawing a region' if so, convert the region to a floater and set the interactive' mode so that we can drag the floaterDim viewer As RasterImageViewer = CType(IIf(TypeOf sender Is RasterImageViewer, sender, Nothing), RasterImageViewer)If viewer.InteractiveMode = RasterViewerInteractiveMode.Region Thenviewer.EnableTimer = Trueviewer.RegionToFloater()viewer.FloaterVisible = Trueviewer.AnimateFloater = Trueviewer.InteractiveMode = RasterViewerInteractiveMode.Floater' delete the region since we do not need it anymoreviewer.Image.MakeRegionEmpty()MessageBox.Show("Move the floater around, double click anywhere on the viewer to combine it with the image")End IfEnd SubPrivate Sub imageViewer_DoubleClick(ByVal sender As Object, ByVal e As EventArgs)' check if the interactive mode is Floater, if so,' combine the floater with the image.Dim viewer As RasterImageViewer = CType(IIf(TypeOf sender Is RasterImageViewer, sender, Nothing), RasterImageViewer)If viewer.InteractiveMode = RasterViewerInteractiveMode.Floater Thenviewer.InteractiveMode = RasterViewerInteractiveMode.Noneviewer.CombineFloater(True, ImageProcessing.CombineFastCommandFlags.SourceCopy)' get rid of the floater since we do not need it anymoreviewer.FloaterImage = NothingMessageBox.Show("The floater has been combined with the image")End IfEnd SubPublic Sub RasterImageViewer_FloaterImage(ByVal viewer As RasterImageViewer)' hook into the viewer InteractiveModeEnded and DoubleClick eventsAddHandler viewer.InteractiveModeEnded, AddressOf imageViewer_InteractiveModeEndedAddHandler viewer.DoubleClick, AddressOf imageViewer_DoubleClick' first set the interactive mode to draw a freehand regionviewer.InteractiveRegionType = RasterViewerInteractiveRegionType.Freehandviewer.InteractiveRegionCombineMode = RasterRegionCombineMode.Setviewer.InteractiveMode = RasterViewerInteractiveMode.RegionMessageBox.Show("Draw a freehand region on the image")End Sub
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
