HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions
hi::v1::theme_model_length Class Reference

#include <hikogui/theme/theme_model.hpp>

Public Member Functions

constexpr theme_model_length (theme_model_length const &)=delete
 
constexpr theme_model_length (theme_model_length &&)=delete
 
constexpr theme_model_lengthoperator= (theme_model_length const &)=delete
 
constexpr theme_model_lengthoperator= (theme_model_length &&)=delete
 
constexpr theme_model_lengthoperator= (theme_length length) noexcept
 
constexpr operator hi::dips () const noexcept
 
constexpr float operator() (float scale) const noexcept
 Get the length in points.
 

Detailed Description

A length in pixels or dips (device independent pixels), optimized for read performance.

This function stores the length as an positive integer (pixels) or a negative integer (dips) which will be scaled by a scale * -4.

Member Function Documentation

◆ operator()()

constexpr float hi::v1::theme_model_length::operator() ( float scale) const
inlineconstexprnoexcept

Get the length in points.

Parameters
scaleThe scale which is multiplied with points to get pixels. The value should be round(scale * -4.0) so that scaling can be done in 25% intervals.

The documentation for this class was generated from the following file: