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 (as reported by get-extent) is used. Note that the editor's size can be smaller than the visible region of its display.