Struct figures::DisplayScale[][src]

pub struct DisplayScale<T> { /* fields omitted */ }
Expand description

Scaling ratios for Scaled and Displayable.

Implementations

Returns the scale between Pixels and Points.

Returns the scale between Points and Scaled.

Returns the scale between Pixels and Scaled.

Sets the scale factor between Points and Scaled.

Sets the scale factor between Pixels and Points.

Returns a new instance with the two scales provided.

  • dpi: This scale represents the scaling between Pixels and Points. It should be set to the system configured user interface scaling, if possible. In general, this scale shouldn’t be something an end-user manually configures.
  • additional_scaling: This scale represents the scaling between Points and Scaled. This is an additional layer of scaling on top of the dpi scaling. It is intended to be used to provide a way for applications to allow end-users to configure an application-specific zoom setting.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns a one value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.