The documentation states that Dc.clear does the following:
Erase the screen using the background color.
Note:
Starting form version 3.1.0, COLOR_TRANSPARENT will also be honored as background color, which will cause the value of pixels in the clip region to be replaced by COLOR_TRANSPARENT. For example, this can be used to clear the transparent overlay layer so animation background is visible.
However, for COLOR_TRANSPARENT
, this works only once in an onUpdate
. A second call to Dc.clear
with COLOR_TRANSPARENT
as background color will not replace the pixels drawn in the same onUpdate
. For other colors like COLOR_BLACK
, this does work.