diff options
author | Joel Bodenmann <joel@embedded.pro> | 2016-11-11 18:35:09 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@embedded.pro> | 2016-11-11 18:35:09 +0100 |
commit | 73a110eed634e757389c647ad988fe750e9be0ee (patch) | |
tree | 478f89f5173b7c6b45e2cb46cca65c097822fce6 | |
parent | ebfe1e95a240cdd29d295522f002325c65df622b (diff) | |
download | uGFX-73a110eed634e757389c647ad988fe750e9be0ee.tar.gz uGFX-73a110eed634e757389c647ad988fe750e9be0ee.tar.bz2 uGFX-73a110eed634e757389c647ad988fe750e9be0ee.zip |
Adding API documentation for new image color palette functions
-rw-r--r-- | src/gdisp/gdisp_image.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/gdisp/gdisp_image.h b/src/gdisp/gdisp_image.h index 41ed7531..76773887 100644 --- a/src/gdisp/gdisp_image.h +++ b/src/gdisp/gdisp_image.h @@ -248,8 +248,40 @@ extern "C" { */ delaytime_t gdispImageNext(gdispImage *img); + /** + * @brief Get the number of entries in the color palette. + * @return The number of entries in the color palette or 0 if the image doesn't use a color palette. + * + * @param[in] img The image structure + * + * @pre gdispImageOpen() must have returned successfully. + */ uint16_t gdispImageGetPaletteSize(gdispImage *img); + + /** + * @brief Get an entry in the color palette. + * @return The color value at a given position in the color palette. + * + * @param[in] img The image structure + * @param[in] index The index of the color palette entry + * + * @pre gdispImageOpen() must have returned successfully. + * + * @note This function will return 0 if the index is out of bounds or if the image doesn't use a color palette. + */ color_t gdispImageGetPalette(gdispImage *img, uint16_t index); + + /** + * @brief Modify an entry in the color palette. + * @return @p TRUE on success, @p FALSE otherwise. + * + * @param[in] img The image structure + * @param[in] index The index of the color palette entry + * @param[in] newColor The new color value of the specified entry + * + * @pre gdispImageOpen() must have returned successfully. + * @note This function will return @p FALSE if the index is out of bounds or if the image doesn't use a color palette. + */ bool_t gdispImageAdjustPalette(gdispImage *img, uint16_t index, color_t newColor); #ifdef __cplusplus |