From 3bd76384f94b48e89a8ee586569315b41d3d5aa5 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 11 Feb 2019 21:49:09 +0100 Subject: [PATCH] cc_draw.h: add member to set force full repaint of item This overrides internal firstpaint and is_painted modes to provoke full repaint of item. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5eea2e9be40092c5b21cd00502be9e185d5c37e8 Author: Thilo Graf Date: 2019-02-11 (Mon, 11 Feb 2019) ------------------ This commit was generated by Migit --- src/gui/components/cc_draw.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gui/components/cc_draw.h b/src/gui/components/cc_draw.h index a6e8d30e3..09fab7cb6 100644 --- a/src/gui/components/cc_draw.h +++ b/src/gui/components/cc_draw.h @@ -281,6 +281,15 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes void allowPaint(bool allow); ///returns visibility mode bool paintAllowed(); + /**Overrides internal firstpaint and is_painted modes to provoke full repaint of item. + * This should help to paint items if they already painted and have existing instances and repaint is required but the internal + * performance protection would prevent this. + * + * @Note add this method before paint() is called, because firstpaint and is_painted modes + * will be reset after callt paint() method + * @see allowPaint(), isPainted(), firstpaint, is_painted + */ + void forceRePaint(){firstPaint = true; is_painted = false;}; ///set color gradient on/off, returns true if gradient mode was changed bool enableColBodyGradient(const int& enable_mode, const fb_pixel_t& sec_color = 255 /*=COL_BACKGROUND*/, const int& direction = 1 /*CFrameBuffer::gradientVertical*/);