Start redrawing the canvas at the previously set timed interval.
173896
def start_refresh(self):
        
        self.logger.debug("starting timed refresh interval")
        self.rf_flags['done'] = False
        self.rf_draw_count = 0
        self.rf_timer_count = 0
        self.rf_late_count = 0
        self.rf_late_total = 0.0
        self.rf_early_count = 0
        self.rf_early_total = 0.0
        self.rf_delta_total = 0.0
        self.rf_skip_total = 0.0
        self.rf_start_time = time.time()
        self.rf_deadline = self.rf_start_time
        self.refresh_timer_cb(self.rf_timer, self.rf_flags)
208811
def fixPoint(self, plotterPoint, canvasPoint):
        ''
        self.visibleBox.xmin = canvasPoint.x - self.canvasW(plotterPoint.x-self.plotviewBox.xmin)
        self.visibleBox.ymin = canvasPoint.y - self.canvasH(plotterPoint.y-self.plotviewBox.ymin)
        self.refresh()
698628
def _onPaint(self, evt):
        

        DEBUG_MSG("_onPaint()", 1, self)
        drawDC = wx.PaintDC(self)
        if not self._isDrawn:
            self.draw(drawDC=drawDC)
        else:
            self.gui_repaint(drawDC=drawDC)
        evt.Skip()
373293
def OnTimer(self, event):
        """"""

        self.timer_updating = True

        shape = self.grid.code_array.shape[:2]
        selection = Selection([(0, 0)], [(shape)], [], [], [])
        self.grid.actions.refresh_selected_frozen_cells(selection)
        self.grid.ForceRefresh()
1125360
def toggleDrawingSensitive(self, drawing=True):
        """"""
        self.actions.editMode.setEnabled(not drawing)
        if not drawing and self.beginner():
            # Cancel creation.
            print('Cancel creation.')
            self.canvas.setEditing(True)
            self.canvas.restoreCursor()
            self.actions.create.setEnabled(True)
591908
@Override
    public void redraw() {
        if (!isDrawn()) {
            draw();
        } else {
            try {
                beforeLoad();
                beforeDataSetLookup();
                dataSetHandler.lookupDataSet(new DataSetReadyCallback() {
                    public void callback(DataSet result) {
                        try {
                            dataSet = result;
                            afterDataSetLookup(result);
                            updateVisualization();

                            // Redraw done
                            afterRedraw();
                        } catch (Exception e) {
                            // Give feedback on any initialization error
                            showError(new ClientRuntimeError(e));
                        }
                    }
                    public void notFound() {
                        String uuid = displayerSettings.getDataSetLookup().getDataSetUUID();
                        getView().errorDataSetNotFound(uuid);
                        handleError("Data set not found: " + uuid);
                    }

                    @Override
                    public boolean onError(final ClientRuntimeError error) {
                        showError(error);
                        return false;
                    }
                });
            } catch (Exception e) {
                showError(new ClientRuntimeError(e));
            }
        }
    }
869243
function() {
        if (this.drawing) {
        this.ctx.beginPath();
        this.ctx.moveTo(this.lastPos.x, this.lastPos.y);
        this.ctx.lineTo(this.currentPos.x, this.currentPos.y);
        this.ctx.stroke();
        this.lastPos = this.currentPos;
      }
    }
568633
def refresh(self):
        
        for cbar in self.colorbars:
            cbar.draw_all()
        self.canvas.draw()
159636
def _redraw(self):
        
        for row in self._rows:
            for widget in row:
                widget.grid_forget()

        offset = 0 if not self.headers else 1
        for i, row in enumerate(self._rows):
            for j, widget in enumerate(row):
                widget.grid(row=i+offset, column=j)
736677
public void tick (long now)
    {
        if (!_enabled) {
            return;
        }

        // Initialize the starting time if necessary
        if (_start == Long.MIN_VALUE) {
            _start = now - Math.round(_duration * _complete);
        }

        // Initialize the timestamp of the rendering error if necessary
        if (_renderOffsetTime == Long.MIN_VALUE) {
            _renderOffsetTime = now;
        }

        // If the timer was just unpaused, handle the updates that
        // need a timestamp
        if (_processUnpause) {
            _processUnpause = false;
            _start += now - _lastUpdate;
        }

        // Update the completion and triggers when the timer is running
        if (running())
        {
            // Figure out how what percent the timer has completed
            _lastUpdate = now;
            _complete = ((float) (_lastUpdate - _start)) / _duration;

            // Handle warning trigger if necessary
            if (triggeredWarning()) {
                handleWarning();
            }

            // Handle completion trigger if necessary
            if (triggeredCompleted()) {
                handleCompleted();
            }
        }

        // Add error to the render completion percent if the interpolation
        // hasn't finished yet
        _renderComplete = _complete;
        if (_renderOffsetTime + _transitionTime > now) {
            _renderComplete += _renderOffset *
                (1f - (now - _renderOffsetTime) / (float) _transitionTime);
            _renderComplete = Math.max(0f, Math.min(1f, _renderComplete));
        }

        // Possibly orce a repaint if the render level changed (highly
        // probable but not guaranteed)
        if (_renderComplete != _paintComplete)
        {
            // Always force a repaint when changing to or from a boundary
            if (_renderComplete <= 0f || _paintComplete <= 0f ||
                _renderComplete >= 1f || _paintComplete >= 1f)
            {
                invalidate();
            }

            // Also force a repaint if the completion state sufficiently
            // changed
            else if (Math.abs(_renderComplete - _paintComplete) >
                     _changeThreshold)
            {
                invalidate();
            }
        }
    }
813007
def _start_selecting(self, event):
        """"""
        self._selecting = True
        canvas = self._canvas
        x = canvas.canvasx(event.x)
        y = canvas.canvasy(event.y)
        self._sstart = (x, y)
        if not self._sobject:
            self._sobject = canvas.create_rectangle(
                self._sstart[0], self._sstart[1], x, y,
                dash=(3,5), outline='#0000ff'
            )
        canvas.itemconfigure(self._sobject, state=tk.NORMAL)
278890
private void refresh() {
        try {
            Canvas canvas = mSurface.lockCanvas(null);
            mWebView.draw(canvas);
            mSurface.unlockCanvasAndPost(canvas);
        } catch (Surface.OutOfResourcesException t) {
            Log.e("GVRWebBoardObject", "lockCanvas failed");
        }
        mSurfaceTexture.updateTexImage();
    }
949428
public void redraw() {
		groups.clear();
		mapWidget.getVectorContext().deleteGroup(editingService.getGeometry());
		draw(editingService.getGeometry());
	}
318784
public void onDraw(final Canvas canvas) {
    mPaint.setColor(0xC0000000);
    mTextRect.set(0, 0, mView.getWidth(), 35);
    canvas.drawRect(mTextRect, mPaint);

    mPaint.setColor(Color.WHITE);
    canvas.drawText("[" + mTag + "]", 10, 15, mPaint);

    String message = "Not started";
    switch (mState) {
      case STARTED:
        message = "Loading...";
        break;
      case SUCCESS:
        message = "Loaded after " + (mFinishTime - mStartTime) + "ms";
        break;
      case FAILURE:
        message = "Failed after " + (mFinishTime - mStartTime) + "ms";
        break;
      case CANCELLATION:
        message = "Cancelled after " + (mFinishTime - mStartTime) + "ms";
        break;
    }
    canvas.drawText(message, 10, 30, mPaint);
  }
1126660
def _on_resize(self):
        
        # Erase, request position (when cursor is at the start position)
        # and redraw again. -- The order is important.
        self.renderer.erase(leave_alternate_screen=False, erase_title=False)
        self.renderer.request_absolute_cursor_position()
        self._redraw()
1304737
def draw_idle(self):
        
        DEBUG_MSG("draw_idle()", 1, self)
        self._isDrawn = False  # Force redraw
        # Create a timer for handling draw_idle requests
        # If there are events pending when the timer is
        # complete, reset the timer and continue.  The
        # alternative approach, binding to wx.EVT_IDLE,
        # doesn't behave as nicely.
        if hasattr(self,'_idletimer'):
            self._idletimer.Restart(IDLE_DELAY)
        else:
            self._idletimer = wx.FutureCall(IDLE_DELAY,self._onDrawIdle)
856192
public void setForegroundPaint(final Paint PAINT) {
        if (null == foregroundPaint) {
            _foregroundPaint = PAINT;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            foregroundPaint.set(PAINT);
        }
    }