.NET display control for Common Vision Blox More...
Inherits UserControl.
Classes | |
class | ZoomState |
Class that memorizes a Display's zoom state for the purpose of later on restoring that state. More... | |
Public Member Functions | |
Display () | |
Default Constructor. | |
Point | ClientToImage (Point pt) |
Convert client coordinates to image coordinates. More... | |
Point | ImageToClient (Point pt) |
Convert image coordinates to display client coordinates. More... | |
Static Public Attributes | |
const double | ClientRectUsageMin = 0.1 |
Minimum fraction of the client rect to be used for painting the Cvb image. | |
const double | ClientRectUsageMax = 1.0 |
Maximum fraction of the client rect to be used for painting the Cvb image. | |
static readonly OverlayDictionary | InstalledOverlays = new OverlayDictionary() |
The only instance of the collection of available overlay plug ins | |
Protected Member Functions | |
override void | Dispose (bool disposing) |
Clean up any resources being used. More... | |
override void | OnBackColorChanged (EventArgs e) |
Background color of the parent class has changed. Reflect the change in the display as well. More... | |
override void | WndProc (ref Message m) |
Route those messages that may be handled by the CVCDisp.dll. More... | |
virtual void | WndProcDisplay (ref Message m) |
Sub-Window procedure that processes the messages that are specific to the Cvb display. More... | |
virtual void | OnLabelMouseOver (LabelEventArgs args) |
Overrideable function that takes care of the LabelMouseOver event. More... | |
virtual void | OnOverlayPluginMouseOver (OverlayPluginMouseOverEventArgs args) |
Overrideable function that takes care of the OverlayPluginMouseOver event. More... | |
virtual void | OnUserOverlayMouseOver (UserOverlayMouseOverEventArgs args) |
Overrideable function that takes care of the UserOverlayMouseOver event. More... | |
virtual void | OnStatusLineUpdated (StatusLineUpdatedEventArgs args) |
Overrideable function that takes care of the StatusLineUpdated event. More... | |
virtual void | OnArea2DAoiDrag (Area2DDragEventArgs args) |
Overrideable function that takes care of the RectangleAOIDrag event. More... | |
virtual void | OnArea2DAoiDragged (Area2DDragEventArgs args) |
Overrideable function that takes care of the RectangleAOIChanged event. More... | |
virtual void | OnRectAoiDrag (RectDragEventArgs args) |
Overrideable function that takes care of the RectangleAOIDrag event. More... | |
virtual void | OnRectangleAoiDragged (RectDragEventArgs args) |
Overrideable function that takes care of the RectangleAOIChanged event. More... | |
virtual void | OnOverlayPluginClicked (OverlayPluginEventArgs args) |
Overrideable function that takes care of the OverlayPluginClicked event. More... | |
virtual void | OnUserOverlayClicked (UserOverlayEventArgs args) |
Overrideable function that takes care of the OverlayClicked event. More... | |
virtual void | OnOverlayPluginDrag (OverlayPluginEventArgs args) |
Overrideable function that takes care of the OverlayClicked event. More... | |
virtual void | OnUserOverlayDrag (UserOverlayEventArgs args) |
Overrideable function that takes care of the OverlayClicked event. More... | |
virtual void | OnOverlayPluginDragged (OverlayPluginEventArgs args) |
Overrideable function that takes care of the OverlayDragged event. More... | |
virtual void | OnUserOverlayDragged (UserOverlayEventArgs args) |
Overrideable function that takes care of the OverlayDragged event. More... | |
virtual void | OnLabelClicked (LabelEventArgs args) |
Overrideable function that takes care of the LabelClicked event. More... | |
virtual void | OnLabelDrag (LabelEventArgs args) |
Overrideable function that takes care of the LabelClicked event. More... | |
virtual void | OnLabelDragged (LabelEventArgs args) |
Overrideable function that takes care of the LabelClicked event. More... | |
virtual void | OnRubberMeasurement (RubberMeasurementEventArgs args) |
Overrideable function that takes care of the RubberMeasurement event. More... | |
virtual void | OnRubberMeasurementFinished (RubberMeasurementEventArgs args) |
Overrideable function that takes care of the RubberMeasurementsFinished event. More... | |
virtual void | OnOverlayMaskChanged (EventArgs args) |
Overrideable function that takes care of the PaintingFinished event. More... | |
virtual void | OnCoordinateSystemClicked (EventArgs args) |
Overrideable function that takes care of the CoordinateSystemClicked event. More... | |
virtual void | OnCoordinateSystemChanged (EventArgs args) |
Overrideable function that takes care of the CoordinateSystemChanged event. More... | |
Properties | |
MouseWheelMode | MouseWheelMode [get, set] |
Sets/gets the current use of the mouse wheel. | |
HighBitScaleMode | HighBitScaleMode [get, set] |
Mode defining the treatment of images with more than 8 bits per pixel. See HighBitScaleMode for a description of the available modes. Note that floating point accuracy images will always be shown as if the mode More... | |
bool | SuppressPaint [get, set] |
This property allows easy access to the same functionality "SetRedraw" offers in the MFC: By setting it to "true", repaints of the display are completely suppressed - until the properties is reset to "false". This can come in handy when assigning a new image to the display without while wanting to preserve the zoom state. | |
OverlayList | Overlays [get] |
The overlays that are currently being displayed on the image | |
bool | UseDirectDraw [get, set] |
Specifies whether DirectDraw or GDI functionality should be used to paint the display. Depending on hardware or driver versions switching the paint functions may yield performance benefits. | |
bool | VSync [get, set] |
Enable or disable the VSync mode. VSync mode enabled means that painting of the display contents is synchronized to the Monitor's VSync signal. This helps suppress display artifacts that may appear if the ratio of your camera's speed and the display rate is unfavorable. However, VSync mode will also reduce the maximum achievable frame rate. More... | |
bool | ManualOverlayRefresh [get, set] |
Enable or disable the overlay refresh mode. Take care because in Manual overlay refresh mode you may experience strange display behavior if you do not refresh your display often enough. Manual display refresh mode however yields better performance when adding or removing lots of display objects. | |
double | ClientRectUsage [get, set] |
Get/Set the proportion of the control's client area to be used for painting the Cvb images. | |
LeftMouseButtonPaintMode | PaintMode [get, set] |
Toggling setting/erasing the overlay pixels when in one of the left button drawing modes. | |
CoordinateDisplayStyle | CoordinateDisplayStyle [get, set] |
Controls the way the coordinate system is being displayed when Left button mode is in 'DefineOrigin'. | |
bool | ShowRuler [get, set] |
Toggle the display of the display ruler. | |
double | PanoramaZoomFactor [get] |
The zoom factor that will be used in Panorama mode. | |
Point | ZoomCenter [get, set] |
Center of the zoom. Note that setting this property while RestrictZoomPositions is set to true may result in the zoom center being adjusted automatically. | |
double | ZoomFactor [get, set] |
magnification factor currently used More... | |
bool | RedrawOnPixelContentChanged [get, set] |
Gets/sets whether the image should redraw itself when the image data is changed. | |
bool | RestrictZoomPositions [get, set] |
Set the current state of the zoom restriction mode. When set to true, the display automatically applies a restriction to the possible center locations of the display zoom so that it cannot happen that a zoomed display consists of up to 75% background when zooming into one of the image's corners. This also means that when ZoomCenter is being set, the value of the ZoomCenter that can be read back may not actually be the position that has just been set. More... | |
bool | ShowScrollbars [get, set] |
Toggle the display of scroll bars when in zoomed mode. | |
bool | ShowImageSize [get, set] |
Set to true to display the size of the current image in the display status line. | |
bool | ShowZoomFactor [get, set] |
Set to true to display the size of the current image in the display status line. | |
bool | ShowCursorPosition [get, set] |
Set to true to display the size of the current image in the display status line. | |
bool | ShowGrayValue [get, set] |
Set to true to display the size of the current image in the display status line. | |
string | StatusLineText [get, set] |
Set to true to display the size of the current image in the display status line. | |
StatusLineStyle | StatusLine [get, set] |
Selects how the display uses the status line. | |
Area2D | SelectedArea2D [get, set] |
Parallelogram-shaped area of interest. Setting this property will show no effect while the LeftButtonMode is not set to LeftMouseButtonMode.DefineArea2DAoi because only in this mode the Area2D AOI will be visible. More... | |
Rect | SelectedRectangle [get, set] |
Rectangular area of interest. Setting this property will show no effect while the LeftButtonMode is not set to DefineRectangleAOI because only in this mode the rectangular AOI will be visible. | |
RightMouseButtonMode | RightMouseButtonBehaviour [get, set] |
Display interaction with the right mouse button | |
LeftMouseButtonMode | LeftMouseButtonBehaviour [get, set] |
Display interaction with the left mouse button | |
double | Gain [get, set] |
Display gain. | |
int | Offset [get, set] |
Display offset. | |
BevelStyle | Bevels [get, set] |
Bevel display style | |
Image | Image [get, set] |
Image to be displayed | |
Events | |
EventHandler< EventArgs > | CoordinateSystemChanged |
Event that will be fired when the coordinate system has been changed by clicking into the display. | |
EventHandler< EventArgs > | CoordinateSystemClicked |
Event that will be fired when the coordinate system has been left-clicked. | |
EventHandler< EventArgs > | OverlayMaskChanged |
Event that will be fired whenever the user has modified the overlay information of the image via mouse-painting. | |
EventHandler< RubberMeasurementEventArgs > | RubberDragged |
Event that will be when the user finished rubber measurements | |
EventHandler< RubberMeasurementEventArgs > | RubberDrag |
Event that will be when the user drags the rubber band to perform measurements on the display | |
EventHandler< RectDragEventArgs > | RectAoiDrag |
Event that will be raised when the Rectangular AOI changed and the user still holds down the left mouse button. | |
EventHandler< RectDragEventArgs > | RectAoiDragged |
Event that will be raised when the Rectangular AOI changed and the user no longer holds down the left mouse button (dragging finished) | |
EventHandler< Area2DDragEventArgs > | Area2DAoiDrag |
Event that will be raised when the Parallelogram AOI changed and the user still holds down the left mouse button. | |
EventHandler< Area2DDragEventArgs > | Area2DAoiDragged |
Event that will be raised when the Parallelogram AOI changed and the user no longer holds down the left mouse button (dragging finished) | |
EventHandler< LabelEventArgs > | LabelClicked |
Event that will be raised when the a display label has been clicked. | |
EventHandler< LabelEventArgs > | LabelDrag |
Event that will be raised while a display label is being dragged. | |
EventHandler< LabelEventArgs > | LabelDragged |
Event that will be raised when a display label is no longer being dragged. | |
EventHandler< OverlayPluginEventArgs > | OverlayPluginClicked |
Event that will be raised when the a display overlay has been clicked. | |
EventHandler< OverlayPluginEventArgs > | OverlayPluginDrag |
Event that will be raised while a display overlay is being dragged. | |
EventHandler< OverlayPluginEventArgs > | OverlayPluginDragged |
Event that will be raised when a display overlay is no longer being dragged. | |
EventHandler< UserOverlayEventArgs > | UserOverlayClicked |
Event that will be raised when the a display overlay has been clicked. | |
EventHandler< UserOverlayEventArgs > | UserOverlayDrag |
Event that will be raised while a display overlay is being dragged. | |
EventHandler< UserOverlayEventArgs > | UserOverlayDragged |
Event that will be raised when a display overlay is no longer being dragged. | |
EventHandler< StatusLineUpdatedEventArgs > | StatusLineUpdated |
Event that will be raised when the display's status line has been updated. | |
EventHandler< LabelEventArgs > | LabelMouseOver |
Event that will be raised when the the mouse cursor is located over a display label. | |
EventHandler< OverlayPluginMouseOverEventArgs > | OverlayPluginMouseOver |
Event that will be raised when the the mouse cursor is located over an overlay plugin. | |
EventHandler< UserOverlayMouseOverEventArgs > | UserOverlayMouseOver |
Event that will be raised when the the mouse cursor is located over an user overlay. | |
.NET display control for Common Vision Blox
Point ClientToImage | ( | Point | pt | ) |
Convert client coordinates to image coordinates.
pt | coordinate to be converted |
|
protected |
Clean up any resources being used.
disposing | true if managed resources should be disposed; otherwise, false. |
Point ImageToClient | ( | Point | pt | ) |
Convert image coordinates to display client coordinates.
pt | coordinate to be converted |
|
protectedvirtual |
Overrideable function that takes care of the RectangleAOIDrag event.
args | event arguments |
|
protectedvirtual |
Overrideable function that takes care of the RectangleAOIChanged event.
args | event arguments |
|
protected |
Background color of the parent class has changed. Reflect the change in the display as well.
e | Event arguments. |
|
protectedvirtual |
Overrideable function that takes care of the CoordinateSystemChanged event.
args | event arguments |
|
protectedvirtual |
Overrideable function that takes care of the CoordinateSystemClicked event.
args | event arguments |
|
protectedvirtual |
Overrideable function that takes care of the LabelClicked event.
args | event arguments |
|
protectedvirtual |
Overrideable function that takes care of the LabelClicked event.
args | event arguments |
|
protectedvirtual |
Overrideable function that takes care of the LabelClicked event.
args | event arguments |
|
protectedvirtual |
Overrideable function that takes care of the LabelMouseOver event.
args | Event argument. |
|
protectedvirtual |
Overrideable function that takes care of the PaintingFinished event.
args | Event argument. |
|
protectedvirtual |
Overrideable function that takes care of the OverlayPluginClicked event.
args | event arguments |
|
protectedvirtual |
Overrideable function that takes care of the OverlayClicked event.
args | event arguments |
|
protectedvirtual |
Overrideable function that takes care of the OverlayDragged event.
args | Event argument. |
|
protectedvirtual |
Overrideable function that takes care of the OverlayPluginMouseOver event.
args | event arguments |
|
protectedvirtual |
Overrideable function that takes care of the RectangleAOIChanged event.
args | event arguments |
|
protectedvirtual |
Overrideable function that takes care of the RectangleAOIDrag event.
args | event arguments |
|
protectedvirtual |
Overrideable function that takes care of the RubberMeasurement event.
args | Event argument. |
|
protectedvirtual |
Overrideable function that takes care of the RubberMeasurementsFinished event.
args | Event argument. |
|
protectedvirtual |
Overrideable function that takes care of the StatusLineUpdated event.
args | Event argument. |
|
protectedvirtual |
Overrideable function that takes care of the OverlayClicked event.
args | event arguments |
|
protectedvirtual |
Overrideable function that takes care of the OverlayClicked event.
args | event arguments |
|
protectedvirtual |
Overrideable function that takes care of the OverlayDragged event.
args | Event argument. |
|
protectedvirtual |
Overrideable function that takes care of the UserOverlayMouseOver event.
args | event arguments |
|
protected |
Route those messages that may be handled by the CVCDisp.dll.
m | Windows Message |
|
protectedvirtual |
Sub-Window procedure that processes the messages that are specific to the Cvb display.
m | Windows message structure |
|
getset |
Mode defining the treatment of images with more than 8 bits per pixel. See HighBitScaleMode for a description of the available modes. Note that floating point accuracy images will always be shown as if the mode
HighBitScaleMode.ViewPort
was set, regardless of your actual setting. Also note that the HighBitScaleMode.ViewPort
setting will cause the display to ignore the values of Gain and Offset.
|
getset |
Set the current state of the zoom restriction mode. When set to true, the display automatically applies a restriction to the possible center locations of the display zoom so that it cannot happen that a zoomed display consists of up to 75% background when zooming into one of the image's corners. This also means that when ZoomCenter is being set, the value of the ZoomCenter that can be read back may not actually be the position that has just been set.
ObjectDisposedException | If this display has already been disposed. |
|
getset |
Parallelogram-shaped area of interest. Setting this property will show no effect while the LeftButtonMode is not set to LeftMouseButtonMode.DefineArea2DAoi because only in this mode the Area2D AOI will be visible.
Note that the Area2D object is always set and used in image coordinates, not in pixel coordinates!
|
getset |
Enable or disable the VSync mode. VSync mode enabled means that painting of the display contents is synchronized to the Monitor's VSync signal. This helps suppress display artifacts that may appear if the ratio of your camera's speed and the display rate is unfavorable. However, VSync mode will also reduce the maximum achievable frame rate.
Use this flag sparsely! Setting this property on more than one Display per UI thread will deadlock your application! Note that setting this property to true will only have an effect if DirectDraw is being used.
|
getset |
magnification factor currently used
NullReferenceException | If the Image property is null |
ObjectDisposedException | If the object has already been disposed |