Conventions on Sizes for Graphical Objects and FontsΒΆ

Design Time Dimensions

In Q Studio, graphical object sizes are expressed in Device-Independent Pixels (DIP), the text sizes are expressed in points.

Runtime Sizes

The size of objects at runtime may vary depending on the scaling factor set in the operating system.

Note

currently, only the Windows scaling factor is supported.

Example

An object with a width set to 100 pixels at design time, will be 125 pixels at runtime on a system with a 125% scaling factor.

Conventions on Font Sizes

One point corresponds to 1/72 inches.

By convention, one inch equals 96 pixels.

Note

the convention is the same used by Microsoft for Windows Presentation Foundation (WPF) (please refer to this page).

Converting Sizes between Pixels and Points

The relationship between pixels and points is expressed by the following example calculation:

12 points = 12/72 inches = 1/6 inches = 96/6 pixels (DIP) = 16 pixels (DIP)

To convert points to pixels, use the following calculation: pixel (DIP) = points * 0.75

To convert pixels to points, use the following formula: pixel (DIP)/0.75

Example

A 12 point font on design will be 20 pixels at runtime on a system with a 125 scaling factor.