When on-paint is overridden, call this method when the state of on-paint's drawing changes.
The x, y, width, and height arguments specify the area that needs repainting in editor coordinates. If width/height is 'end, then the total height/width of the editor is used.