floater Property

Summary

Floater image of this item.

Syntax

JavaScript Syntax
Object.defineProperty(ImageViewerItem.prototype, 'floater', 
	get: function(), 
	set: function(value) 
) 
TypeScript Syntax
floater: HTMLCanvasElement; 

Property Value

The floater image of this item. Default value is null.

Remarks

The image viewer supports a floater image that can be dragged with the mouse or touch when ImageViewerFloaterInteractiveMode is used.

The floater outline can be rendered or animated using FloaterRegionRenderMode.

The position, scale and rotation of the floater can be manipulated with the FloaterTransform property.

FloaterOpacity can be used to set any opacity value for the floater from completely transparent to fully opaque and in between.

Changing the value of this property will fire the ItemChanged event with ImageViewerItemChangedReason.Floater.

Floater property of ImageViewer will update this member if this is the active item when the viewer is used in single item mode.

For more information, refer to Image Viewer Items.

Example

JavaScript Example
var item = null; 
var image = null; 
 
if (this._imageViewer.items.count > 0) { 
   item = this._imageViewer.items.item(0); 
   canvas = item.canvas; 
} 
 
if (canvas == null) 
   return; 
 
var ctx = canvas.getContext("2d"); 
var imageData = ctx.getImageData(10, 10, item.size.width / 2, item.size.height / 2); 
 
item.floater = document.createElement("canvas"); 
var ctx = item.floater.getContext("2d"); 
ctx.putImageData(imageData, imageData.width, imageData.height); 
 
var transform = lt.LeadMatrix.identity; 
transform.rotateAt(45, imageData.width / 2, imageData.height / 2); 
item.floaterTransform = lt.LeadMatrix.multiply(transform, item.floaterTransform); 

Requirements

Target Platforms

Help Version 19.0.2017.10.18
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls Assembly