Leadtools.WinForms Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.8.31
UseDpi Property
See Also 
Leadtools.WinForms Namespace > RasterImageViewer Class : UseDpi Property




Gets or sets a value that indicates whether LEAD's automated scaling properties are used to account for the physical resolution of the bitmap.

Syntax

Visual Basic (Declaration) 
<CategoryAttribute("Behavior")>
<DescriptionAttribute("Indicates whether LEAD's automated scaling properties are used to account for the physical resolution of the bitmap.")>
Public Overridable Property UseDpi As Boolean
Visual Basic (Usage)Copy Code
Dim instance As RasterImageViewer
Dim value As Boolean
 
instance.UseDpi = value
 
value = instance.UseDpi
C# 
[CategoryAttribute("Behavior")]
[DescriptionAttribute("Indicates whether LEAD's automated scaling properties are used to account for the physical resolution of the bitmap.")]
public virtual bool UseDpi {get; set;}
Managed Extensions for C++ 
[CategoryAttribute("Behavior")]
[DescriptionAttribute("Indicates whether LEAD's automated scaling properties are used to account for the physical resolution of the bitmap.")]
public: __property virtual bool get_UseDpi();
public: __property virtual void set_UseDpi( 
   bool value
);
C++/CLI 
[CategoryAttribute("Behavior")]
[DescriptionAttribute("Indicates whether LEAD's automated scaling properties are used to account for the physical resolution of the bitmap.")]
public:
virtual property bool UseDpi {
   bool get();
   void set (bool value);
}

Return Value

true Account for the physical resolution. Default value is false.

Example

Remarks

The physical resolution of an image is measured in dots per inch (DPI). When you load an image, the XResolution and YResolution properties are updated with the DPI values for the horizontal and vertical resolution. Some images have different horizontal and vertical resolutions. For example, the horizontal resolution of a fax image is typically twice its vertical resolution (for example 200 by 100). In such cases, the displayed images will appear elongated if you do not account for the resolution. If the values of the XResolution property and the YResolution property are not equal, set the UseDpi property to true to have LEAD's automated scaling properties account for the physical resolution of the image.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also