ImageGear PDF v25.2 - Updated
ImGearPageDisplay Properties and Methods
Developer Guide > How to Work with... > Common Operations > Viewing > Image Display Using ImGearPage > ImGearPageDisplay Properties and Methods

ImGearPageDisplay Class provides a great deal of display-related properties and methods. All of the methods, and most of these properties, are used by your application program to control the way the image is displayed in the application.

The following ImGearPageDisplay Class properties and methods affect the display of an image only, not the image itself (as contained in the ImGearPage Class object). They do not alter the image bitmap. To alter the image itself, use the Image Manipulation facilities of ImageGear, described below.

A few of these properties are "read-only", and provide information about the rendered image to your application. The ImGearPageDisplay Class properties are grouped into data-value objects as a way to organize them. The data-value objects, and the properties that they contain, are as follows (for complete descriptions of these properties and methods, see the ImageGear.Display Namespace).

Name Description
IImGearAntiAlias Interface

Properties used to make scanned text more readable, by removing or minimizing the "aliasing" (jagged edges of characters and other thin lines). For example:

Original Image

 

Image with AntiAliasing

These properties can be referenced directly, using the AntiAliasing Property of ImGearPageDisplay Class:

C#
Copy Code
imGearPageView.Display.AntiAliasing.Method = ImGearAliasModes.NONE;
IImGearBackground Interface

Controls the appearance of the area that is inside ImGearPageView Class, but outside of the displayed image. For example:

Default Background

Your application can set the background to a solid color or disable background drawing. These properties can be referenced directly, using the Background Property of ImGearPageDisplay Class:

C#
Copy Code
imGearPageView.Display.Background.Mode = ImGearBackgroundModes.NONE;
ImGearScrollInfo Structure

Controls the way a portion of a large image is visible within the smaller ImGearPageView Class. Scrolling can either be automatic (ImageGear takes care of it) or manual (your application has to react to mouse events and tell ImGearPageDisplay Class how to position the image). The scroll properties are all interrelated, and so they are "gotten" from ImGearPageDisplay Class as a group, and they are "updated" in ImGearPageDisplay Class as a group. Access them as follows:

C#
Copy Code
ImGearScrollInfo igScrollInfo;
igScrollInfo = imGearPageView.Display.GetScrollInfo(imGearPageView);

Change the properties as follows:

C#
Copy Code
igScrollInfo.Horizontal.Mode = ImGearScrollBarModes.SCROLLBAR_ENABLE;
imGearPageView.Display.UpdateScrollFrom(imGearPageView, igScrollInfo);
ImGearZoomInfo Structure

Controls the way that an image is magnified before being displayed in the ImGearPageView Class. For example:

Actual Size

300% Zoom

The zoom properties are all interrelated, and so they are "gotten" from ImGearPageDisplay Class as a group, and they are "updated" in ImGearPageDisplay Class as a group. Access them as follows:

C#
Copy Code
ImGearZoomInfo igZoomInfo;
igZoomInfo = imGearPageView.Display.GetZoomInfo(imGearPageView);
bool isHorizontalFixed;
// Check if the horizontal zoom mode is fixed.
isHorizontalFixed = igZoomInfo.Horizontal.Fixed;

Change the properties as follows:

C#
Copy Code
igZoomInfo.Horizontal.Fixed = true;
igZoomInfo.Horizontal.Value = 0.5;
igZoomInfo.Vertical.Fixed = true;
igZoomInfo.Vertical.Value = 0.5;
imGearPageView.Display.UpdateZoomFrom(igZoomInfo);
ImGearPageDisplay.Layout Property

Controls the geometric appearance (full image or partial image, centered or not, etc.) of the image as displayed in ImGearPageView Class.

Layout settings include three rectangles (ImageRect, ClipRect and DeviceRect) that can be used to control the layout of the image as rendered a see ImageRect, ClipRect, and DeviceRect for a description of these rectangles. Normally your application won't reference these rectangles, as they default to the size of the image and the size of the ImGearPageView Class client area, respectively.

The most commonly used layout properties are Alignment and FitMode:

Alignment.Horizontal: Left
Alignment.Vertical: Top

Fit: To Window Height

These properties can be referenced directly, using the Layout Property of ImGearPageDisplay Class:

C#
Copy Code
imGearPageView.Display.Layout.FitMode = ImGearFitModes.ACTUAL_SIZE;
ImGearFitModes igFitMode;
igFitMode = imGearPageView.Display.Layout.FitMode;

The Orientation Property attribute is accessible directly from the ImGearPageDisplay Class object:

ImGearPageDisplay.Orientation Property

Another control that determines the geometric appearance of the image as displayed in ImGearPageView Class. For example:

BOTTOM_RIGHT

RIGHT_BOTTOM

These properties can be referenced directly:

C#
Copy Code
imGearPageView.Display.Orientation.Value = ImGearOrientationModes.BOTTOM_RIGHT;
ImGearOrientationModes igOrientationMode;
igOrientationMode = imGearPageView.Display.Orientation.Value;

The following ImGearPageDisplay Class methods can be used to change the way the ImGearPage Class image is rendered:

Is this page helpful?
Yes No
Thanks for your feedback.