diff options
author | mvglasow <michael -at- vonglasow.com> | 2015-11-08 13:03:02 +0100 |
---|---|---|
committer | mvglasow <michael -at- vonglasow.com> | 2015-12-20 14:33:52 +0100 |
commit | 719cabfa36380f855f8b68d29d849d4d3c3c2869 (patch) | |
tree | 15cedff4ebbf2883510cd6a554d3560704ed8009 /navit/osd/core | |
parent | 595430993252adf48bb2cdf2e5ea1b90a1ab86a8 (diff) | |
download | navit-719cabfa36380f855f8b68d29d849d4d3c3c2869.tar.gz |
Refactor:osd_core:Document osd_button_adjust_sizes()
Diffstat (limited to 'navit/osd/core')
-rw-r--r-- | navit/osd/core/osd_core.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/navit/osd/core/osd_core.c b/navit/osd/core/osd_core.c index 8166e54a2..4754cc392 100644 --- a/navit/osd/core/osd_core.c +++ b/navit/osd/core/osd_core.c @@ -1423,6 +1423,20 @@ struct osd_button { }; +/** + * @brief Adjusts width and height of an OSD item to fit the image it displays. + * + * A width or height of 0%, stored in relative attributes as {@code ATTR_REL_RELSHIFT}, is used as a flag + * indicating that the respective dimension is unset, i.e. determined by the dimensions of its image. + * + * If this is the case for height and/or width, the respective dimension will be updated to fit the image. + * + * Note that this method is used by several OSD items, notably {@code osd_image}, {@code osd_button} and + * {@code osd_android_menu}. + * + * @param opc The OSD item + * @param img The image displayed by the item + */ static void osd_button_adjust_sizes(struct osd_priv_common *opc, struct graphics_image *img) { |