This documentation is for the old version. Go to the latest Graphics Mill docs

BitmapViewer Class

This class represents scrollable viewport control.

Namespace: Aurigma.GraphicsMill.WinControls
Assembly: Aurigma.GraphicsMill.WinControls (in Aurigma.GraphicsMill.WinControls.dll)

Syntax

Visual Basic
Public Class BitmapViewer _
	Inherits ViewerBase
C#
public class BitmapViewer : ViewerBase

Remarks

This class is intended to display the image represented by the Bitmap object. It allows zooming and scrolling the displayed image. Also, you can add a rubberband rectangle (e.g. use it to select a portion of the image).

To set the image which should be displayed, use the Bitmap property. You can either here assign an instance of the Bitmap class or call loading/creating methods of this class directly.

A number of members specifies the behavior of the image displaying.

  • AutoUpdate propertywhen true, the control is automatically redrawn whenever the image stored in the Bitmap property is changed.
  • WorkspaceChanged eventfires when the image stored in the Bitmap property is updated.
  • ScaleToActualSize propertywhen true, the control takes into the account the resolution of the image. This way you will see the image in its physical size. Also you can properly handle situations when the horizontal and vertical resolutions are different (typical for fax images).
  • AlphaEnabled propertywhen true, and the image contains transparent or semi-transparent areas (alpha channel available), it is handled properly (alpha blending is used). Otherwise alpha channel is ignored. Alpha blending is working slower than common pixels copying, so it is recommended to disable this feature when it is not necessary.
  • ColorManagementEngine propertywhen LittleCms the control uses the LittleCMS color management engine during displaying. When AdobeCmm the control uses the Adobe CMM color management engine during displaying. If the color management is disabled (the ColorManagementEngine property is None) colors are displayed less accurate, but it working faster.
  • Zoom propertywhen changed, the image is zoomed in (if Zoom value is larger than 1) or out (if Zoom is less than 1). Image also can be zoomed by the mouse wheel scrolled with the Shift button pressed. Also you can use Navigator property to specify the behavior on the mouse clicks/move, including zoom in/out, or zooming the selected rectangle.
  • ZoomQuality propertyspecifies the zooming quality.
  • ZoomMode propertyspecifies the zooming mode. It can be manual (when Zoom property is specified manually) or automatic. In the automatic mode the zoom factor is calculated automatically (and you cannot change it until switch to the manual mode). Depending on the mode, it can zoom image to fit at the control without scroll bars (BestFit), zoom to eliminate the horizontal scroll bar (FitToWidth), etc.

If you want to add a selection on the image, you should use the Rubberband property. You should assign here an instance of the RectangleRubberband class.

Inheritance Hierarchy

Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.

Object Model






See Also

Reference