RichViewPixelsPerInch Typed Constant

Top  Previous  Next

Number of pixels in one screen inch.

Unit RVFuncs.

Syntax

const

  RichViewPixelsPerInch : Integer = 0

If 0 (default), RichView uses the screen resolution (Screen.PixelsPerInch).

If nonzero, this value is used.

This value is used when converting pixels on the screen to mm, inches, twips, pixels on the printer, and vice versa.

The most important applications are:

printing;

RTF export&import;

calculating sizes of objects when they are measured in twips.

This constant does not affect text (TRVStyle.TextStyles.PixelsPerInch property is used for text, it has the same meaning). This constant affects pictures and tables.

The main possible values: 96 (small font mode), 120 (large font mode).

Assigning positive value this constant makes printing and RTF export independent of the screen resolution (small font/large fonts mode).

 

If you use TRVRuler component (from RichViewActions) and if you assign a positive value to RichViewPixelsPerInch, assign the same value to RVRuler1.ScreenRes property,

 

Since TRichView 17.6, the PPI (nonzero RichViewPixelsPerInch, or Screen.PixelsPerInch otherwise) is stored in RVF files. After loading controls from RVF, they are rescaled from RVF's PPI to the actual PPI, and the actual PPI is assigned to the loaded control's Font.PixelsPerInch. You can disable scaling by assigning 0 to the additional integer property rveipcDPIScalable (but the actual PPI is still assigned to Font.PixelsPerInch).

srv_icon ScaleRichView note: for applications that use ScaleRichView, value of RichViewPixelsPerInch = 96 and must not be changed.


TRichView © trichview.com