←Select platform

GeometryFrameType Property

Summary

Gets or sets a value indicating the current geometry frame type.

Syntax

C#
VB
C++
public GeometryFrameType GeometryFrameType { get; set; } 
  
Public Property GeometryFrameType As Leadtools.Windows.Controls.GeometryFrameType 

Property Value

One of the GeometryFrameType enumeration members that indicate the current geometry frame type. Default value is GeometryFrameType.None.

Remarks

The Geometry property can be used to put any shape on top of this control and frame it to indicate the current region of interest area.

The coordinates of the Geometry must be in image coordinates, and accordingly, the geometry will be zoomed in and out and scrolled depending on current viewer zoom value and scroll position.

The ImageViewer control does not create a geometry object by itself, however you can set the value of Geometry to any System.Windows.Media.Geometry object or one of its derived classes (for example, a System.Windows.Media.PathGeometry) to simulate a region of interest. How the coordinates are calculated and what to do with this area is up to you since WPF/Silverlight System.Windows.Media.ImageSource and its derived classes do not use a region of interest.

The RasterImageViewer control is used to view a LEADTOOLS Leadtools.RasterImage object. This object has support for a region of interest that can be used to limit image processing effects to a certain area of the image of example. The Leadtools.RasterImage region is expressed with a Leadtools.RasterRegion object and you can use the RasterRegionConverter.ConvertToGeometry to convert the Leadtools.RasterRegion object to a WPF/Silverlight System.Windows.Media.Geometry object. When the region inside the Leadtools.RasterImage object being used with this RasterImageViewer is changed, the control will automatically creates a new System.Windows.Media.Geometry object and set in the Geometry property.

In either cases, to draw the geometry of the viewer, you must set the value of the GeometryFrameType property to GeometryFrameType.Fixed or GeometryFrameType.Animated. This value is set to GeometryFrameType.None by default which instructs the control to not draw the geometry.

Example

This example will set the frame type to be animated and then sets a region into the image in the viewer.

C#
VB
Silverlight C#
Silverlight VB
using Leadtools.Help; 
using Leadtools.Windows.Controls; 
 
 
public void ImageViewer_ImageEffect(ImageViewer viewer) 
{ 
   viewer.ImageEffect = new DropShadowEffect(); 
} 
Imports Leadtools.Windows.Controls 
 
 
Public Sub ImageViewer_ImageEffect(ByVal viewer As ImageViewer) 
   viewer.ImageEffect = New DropShadowEffect() 
End Sub 
using Leadtools.Help; 
using Leadtools.Windows.Controls; 
 
 
public void ImageViewer_ImageEffect(ImageViewer viewer) 
{ 
   viewer.ImageEffect = new DropShadowEffect(); 
} 
Imports Leadtools 
Imports Leadtools.Windows.Controls 
 
 
Public Sub ImageViewer_ImageEffect(ByVal viewer As ImageViewer) 
   viewer.ImageEffect = New DropShadowEffect() 
End Sub 

Requirements

Target Platforms

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

Leadtools.Windows.Controls Assembly