XenevaOS
Loading...
Searching...
No Matches
Functions
unit.h File Reference
#include <libcss/unit.h>
Include dependency graph for unit.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

css_fixed css_unit_len2px_mq (const css_unit_ctx *ctx, const css_fixed length, const css_unit unit)
 
css_error css_unit_compute_absolute_font_size (const css_hint_length *ref_length, const css_computed_style *root_style, css_fixed font_size_default, css_hint *size)
 

Function Documentation

◆ css_unit_compute_absolute_font_size()

css_error css_unit_compute_absolute_font_size ( const css_hint_length *  ref_length,
const css_computed_style *  root_style,
css_fixed  font_size_default,
css_hint *  size 
)

Convert relative font size units to absolute units.

Parameters
[in]ref_lengthReference font-size length or NULL.
[in]root_styleRoot element style or NULL.
[in]font_size_defaultClient default font size in CSS pixels.
[in,out]sizeThe length to convert.
Returns
CSS_OK on success, or appropriate error otherwise.

◆ css_unit_len2px_mq()

css_fixed css_unit_len2px_mq ( const css_unit_ctx *  ctx,
const css_fixed  length,
const css_unit  unit 
)

Convert a length to CSS pixels for a media query context.

Parameters
[in]ctxDocument unit conversion context.
[in]lengthLength to convert.
[in]unitCurrent unit of length.
Returns
A length in CSS pixels.