Method

StThemeNodeget_length

Declaration [src]

gdouble
st_theme_node_get_length (
  StThemeNode* node,
  const char* property_name
)

Description [src]

Generically looks up a property containing a single length value. When specific getters (like st_theme_node_get_border_width()) exist, they should be used instead. They are cached, so more efficient, and have handling for shortcut properties and other details of CSS.

Unlike st_theme_node_get_color() and st_theme_node_get_double(), this does not print a warning if the property is not found; it just returns 0.

See also st_theme_node_lookup_length(), which provides more options. The returned value is in physical pixels, as opposed to logical pixels.

Parameters

property_name

Type: const char*

The name of the length property.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.

Return value

Type: gdouble

The length, in pixels, or 0 if the property was not found.