Specifies number of pixels in one inch.
property UnitsPixelsPerInch: Integer;
(introduced in version 18)
This property is applied to:
▪values measured in pixels (of TRVPixelLength type);
▪sizes of pictures in documents (if they are not resized by the user).
When displaying these sizes on a device (screen or paper), they are recalculated according to the device resolution, so these sizes are device-independent.
It's highly recommended to leave the default value of this property (96). With this setting, pixels in TRichView are similar to pixels in HTML (which also assume 96 DPI).
Alternatively, you can assign a value of Screen.PixelsPerInch to this property, to measure values in screen pixels (as it was default in TRichView versions prior to 18).
You can implement zooming using this property (for example, if UnitsPixelsPerInch = 48, value = 100 is displayed in 96 DPI as 100 * 96 / 48 = 200, i.e. 200% zoom). However, it is highly not recommended, because:
▪this setting affects everything (file import and export, printing), not only displaying ion the screen;
▪this setting does not affect text size.
If you use TRVRuler from RichViewActions, after changing value of UnitsPixelsPerInch, you need to change the ruler's UnitsPixelsPerInch accordingly:
The same for TrvActionPageSetup: