summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormvglasow <michael -at- vonglasow.com>2015-11-08 13:03:02 +0100
committermvglasow <michael -at- vonglasow.com>2015-12-20 14:33:52 +0100
commit719cabfa36380f855f8b68d29d849d4d3c3c2869 (patch)
tree15cedff4ebbf2883510cd6a554d3560704ed8009
parent595430993252adf48bb2cdf2e5ea1b90a1ab86a8 (diff)
downloadnavit-719cabfa36380f855f8b68d29d849d4d3c3c2869.tar.gz
Refactor:osd_core:Document osd_button_adjust_sizes()
-rw-r--r--navit/osd/core/osd_core.c14
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)
{