Sign in Join
FPDoc Onlineexperiment

ScaleX function

In unit Graphics

Resizes the specified horizontal size from a given display density to the current screen PPI.

Declaration

pascal
function ScaleX(const SizeX: Integer; const FromDPI: Integer): Integer

Arguments

SizeX

Size value scaled in the routine.

FromDPI

Original display density (Pixels per Inch).

Function result

New horizontal size after scaling.

Description

Multiplies the values in SizeX and the PixelsPerInchX member in ScreenInfo, and divides the product by the value in FromDPI. The return value is rounded to the nearest Integer value.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.