CVB.Net 14.0
IDisplay Interface Reference

Common CVB WPF Display interface. More...

Inherits IInputElement.

Inherited by Display, and DisplayCanvas.

Public Member Functions

void RedrawImage ()
 Redraws the display based on the set IDisplay.Image. More...
 

Properties

Point ActualZoomCenter [get]
 Gets the rendered zoom center of this display. More...
 
double ActualZoomFactor [get]
 Gets the rendered zoom factor of this display. More...
 
Image Image [get, set]
 Gets/sets a Stemmer.Cvb.Image as the image source of this display. More...
 
HighBitScaleMode HighBitScaleMode [get, set]
 Gets/sets the Stemmer.Cvb.HighBitScaleMode used by this display.
 
BitmapSource ImageSource [get, set]
 Image source of this display. More...
 
bool IsAnimated [get, set]
 Gets/sets whether ZoomCenter or ZoomFactor changes are animated.
 
bool IsAnimationInProgress [get]
 Gets whether the control's internal animation is in progress.
 
bool IsInStretchMode [get]
 Gets whether the stretch mode is active and not the zoom mode. More...
 
bool IsZoomActive [get]
 Gets whether this control is currently in zoom mode and the zoom factor is greater than one. More...
 
double StretchZoomFactor [get]
 Gets the zoom factor as if in the case as if this control would be in stretch mode. More...
 
Point ZoomCenter [get, set]
 Gets/sets the zoom center. More...
 
double ZoomFactor [get, set]
 The current zoom factor of the image. More...
 

Events

EventHandler< DisplayZoomEventArgsActualZoomCenterChanged
 Bubbling routed event that is fired when the ActualZoomCenter changes.
 
EventHandler< DisplayZoomEventArgsActualZoomFactorChanged
 Bubbling routed event that is fired when the ActualZoomFactor changes.
 
EventHandler< DisplayZoomEventArgsZoomCenterChanged
 Bubbling event that is fired when the ZoomCenter property is changed.
 
EventHandler< DisplayZoomEventArgsZoomFactorChanged
 Bubbling event that is fired when the ZoomFactor property is changed.
 

Detailed Description

Common CVB WPF Display interface.

Member Function Documentation

◆ RedrawImage()

void RedrawImage ( )

Redraws the display based on the set IDisplay.Image.

This method only works with a set Stemmer.Cvb.Image and redraws this display with the image's content. This method does nothing if only a BitmapSource is set.

Implemented in Display, and DisplayCanvas.

Property Documentation

◆ ActualZoomCenter

Point ActualZoomCenter
get

Gets the rendered zoom center of this display.

This is the actual value of the rendered control. Default is a point with double.NaN coordinates.

This property is a calculated value based on the ZoomCenter and System.Windows.FrameworkElement.ActualWidth and System.Windows.FrameworkElement.ActualHeight by the layout system. The value is set by the layout system itself, based on an actual rendering pass, and may therefore lag slightly behind the set value of properties such as ZoomFactor that are the basis of the input change.

Because this value is calculated, you should be aware that there could be multiple or incremental reported changes to it as a result of various operations by the layout system. The layout system may be calculating required measure space for child elements, constraints by the parent element, and so on.

Implemented in Display, and DisplayCanvas.

◆ ActualZoomFactor

double ActualZoomFactor
get

Gets the rendered zoom factor of this display.

This is the actual value of the rendered control. Default is double.NaN.

This property is a calculated value based on the ZoomFactor and System.Windows.FrameworkElement.ActualWidth and System.Windows.FrameworkElement.ActualHeight by the layout system. The value is set by the layout system itself, based on an actual rendering pass, and may therefore lag slightly behind the set value of properties such as ZoomFactor that are the basis of the input change.

Because this value is calculated, you should be aware that there could be multiple or incremental reported changes to it as a result of various operations by the layout system. The layout system may be calculating required measure space for child elements, constraints by the parent element, and so on.

Implemented in Display, and DisplayCanvas.

◆ Image

Image Image
getset

Gets/sets a Stemmer.Cvb.Image as the image source of this display.

If this property is set the ImageSource property is readonly.

Implemented in Display, and DisplayCanvas.

◆ ImageSource

BitmapSource ImageSource
getset

Image source of this display.

If DisplayCanvas.Image is set, this property is readonly.

Implemented in Display, and DisplayCanvas.

◆ IsInStretchMode

bool IsInStretchMode
get

Gets whether the stretch mode is active and not the zoom mode.

True if stretch mode is active; false if zoom mode is active.

The stretch mode was called panorama mode in the CVB Display ActiveX control.

Implemented in Display, and DisplayCanvas.

◆ IsZoomActive

bool IsZoomActive
get

Gets whether this control is currently in zoom mode and the zoom factor is greater than one.

This control is either in zoom mode (true value) or in panorama/stretch mode (false value).

Implemented in Display, and DisplayCanvas.

◆ StretchZoomFactor

double StretchZoomFactor
get

Gets the zoom factor as if in the case as if this control would be in stretch mode.

The zoom factor that would be used in stretch mode.

Implemented in Display, and DisplayCanvas.

◆ ZoomCenter

Point ZoomCenter
getset

Gets/sets the zoom center.

Point in the bitmap source which is the center of the zoomed view port. Coordinates are in bitmap pixels.

Implemented in Display, and DisplayCanvas.

◆ ZoomFactor

double ZoomFactor
getset

The current zoom factor of the image.

A zoom factor larger than 1.0 magnifies the displayed image; values smaller than 1.0 zoom out whereas 1.0 displays the image as is (this resembles System.Windows.Media.Stretch.None). The special value 0.0 identifies the panorama or stretch mode which resembles System.Windows.Media.Stretch.Uniform (the default). Values smaller 0.0 are invalid.

To get the actual value, e.g. in panorama/stretch mode, use the ActualZoomFactor property.

Implemented in Display, and DisplayCanvas.