Update the image before drawing.
541098
def update(self):
        '''
        
        '''
        self.image = self.blank.copy()
        vcenter_blit(self.image, 
                self.font.render(self.get(), True, self.color), 
                self.margin)
1059222
def draw(self, milliseconds, surface):
        """"""
        surface.blit(self.image, self.coords, self.source, special_flags=0)
1128487
public void updateGraphics(Graphics2D g)
    {
        g.setFont(font);
        g.setColor(color);
        g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
        g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
    }
9706
def update(self, event, annotation):
        """"""
        # Decide whether or not to hide previous highlights...
        for artist in self.highlights.values():
            if self.display == 'multiple':
                continue
            if self.display == 'one-per-axes':
                if event.artist.axes is not artist.axes:
                    continue
            artist.set_visible(False)
        self.show_highlight(event.artist)
        DataCursor.update(self, event, annotation)
886313
def draw(self):
        """"""
        if not self.visible:
            return

        # Blit the current checkbox's image.

        if self.isEnabled:
            if self.mouseIsDown and self.lastMouseDownOverButton and self.mouseOverButton:
                if self.value:
                    self.window.blit(self.surfaceOnDown, self.loc)
                else:
                    self.window.blit(self.surfaceOffDown, self.loc)
            else:
                if self.value:
                    self.window.blit(self.surfaceOn, self.loc)
                else:
                    self.window.blit(self.surfaceOff, self.loc)


        else:
            if self.value:
                self.window.blit(self.surfaceOnDisabled, self.loc)
            else:
                self.window.blit(self.surfaceOffDisabled, self.loc)
254406
public void update( ImageGray image ) {
		if( approximateHistogram ) {
			for (int i = 0; i < bins.length; i++)
				bins[i] = 0;

			if (image instanceof GrayF32)
				update((GrayF32) image);
			else if (GrayI.class.isAssignableFrom(image.getClass()))
				update((GrayI) image);
			else
				throw new IllegalArgumentException("Image type not yet supported");
		} else {
			GImageStatistics.histogram(image,0,bins);
		}
	}
555441
public void update(final Graphics g) {
        final Dimension d = getSize();
        if ( (this.offScreenImage == null) ) {
            this.offScreenImage = createImage( d.width,
                                          d.height );
        }
        paint( this.offScreenImage.getGraphics() );
        g.drawImage( this.offScreenImage,
                     0,
                     0,
                     null );
    }
995458
function update(image) {
  if (image.lazyLoad) {
    return;
  }

  var rect = DOM.getRect(image.element);
  var foundBreakpoint;

  for (var i = 0; i < image.knownSizes.length; i++) {
    var s = image.knownSizes[i];

    if (rect.width <= s) {
      foundBreakpoint = s;
    } else {
      break;
    }
  }

  if (!foundBreakpoint) {
    foundBreakpoint = image.knownSizes[0];
  }

  if (foundBreakpoint !== image.currentBreakpoint || !image.hasRunOnce) {
    image.currentBreakpoint = foundBreakpoint;
    loadImageForBreakpoint(image, image.currentBreakpoint);
  }
}
28994
def _updateCanvasDraw(self):
        
        fn = self.canvas.draw
        def draw2(*a,**k):
            self._updateGridSpec()
            return fn(*a,**k)
        self.canvas.draw = draw2
1361035
def update(self):
        
        # Sort out chars
        cursor = u"█" if self._canvas.unicode_aware else "O"
        back = u"░" if self._canvas.unicode_aware else "|"

        # Now draw...
        try:
            sb_pos = self._get_pos()
            sb_pos = min(1, max(0, sb_pos))
            sb_pos = max(int(self._height * sb_pos) - 1, 0)
        except ZeroDivisionError:
            sb_pos = 0
        (colour, attr, bg) = self._palette["scroll"]
        y = self._canvas.start_line if self._absolute else 0
        for dy in range(self._height):
            self._canvas.print_at(cursor if dy == sb_pos else back,
                                  self._x, y + self._y + dy,
                                  colour, attr, bg)
968448
public void update() {
        if (settings != null && getWidth() > 0 && getHeight() > 0) {
            // Updating finder area rectangle
            GravityUtils.getMovementAreaPosition(settings, tmpRect);
            rect.set(tmpRect);
            rect.offset(getPaddingLeft(), getPaddingTop());

            // We want to stroke outside of finder rectangle, while by default stroke is centered
            strokeRect.set(rect);
            float halfStroke = 0.5f * paintStroke.getStrokeWidth();
            strokeRect.inset(-halfStroke, -halfStroke);

            invalidate();
        }
    }
794835
private void update(I image) {
		computeCurrToInit_PixelTran();

		// only process a cropped portion to speed up processing
		RectangleLength2D_I32 box = DistortImageOps.boundBox(image.width, image.height,
				stitchedImage.width, stitchedImage.height,work, tranCurrToWorld);

		int x0 = box.x0;
		int y0 = box.y0;
		int x1 = box.x0 + box.width;
		int y1 = box.y0 + box.height;

		distorter.setModel(tranWorldToCurr);
		distorter.apply(image, stitchedImage,x0,y0,x1,y1);
	}
254610
def interpolation_change_cb(self, setting, value):
        """"""
        canvas_img = self.get_canvas_image()
        canvas_img.interpolation = value
        canvas_img.reset_optimize()
        self.redraw(whence=0)
1136876
public void updateImage()
    {
        if (m_iCurrentState == ON)
            this.setIcon(m_iconOn);
        else if (m_iCurrentState == OFF)
            this.setIcon(m_iconOff);
        else
            this.setIcon(m_iconNull);
    }
424967
public void updateNoDraw() {
		if (autoUpdate) {
			long now = getTime();
			long delta = now - lastUpdate;
			if (firstUpdate) {
				delta = 0;
				firstUpdate = false;
			}
			lastUpdate = now;
			nextFrame(delta);
		}
	}
996849
def update(self):
        
        DEBUG_MSG("update()", 1, self)
        self._axes = self.canvas.figure.get_axes()
        self._menu.updateAxes(len(self._axes))
710885
def update_image(self, data):
        
        if 1 in data.shape:
            data = data.squeeze()
        if self.conf.contrast_level is not None:
            clevels = [self.conf.contrast_level, 100.0-self.conf.contrast_level]
            imin, imax = np.percentile(data, clevels)
            data = np.clip((data - imin)/(imax - imin + 1.e-8), 0, 1)
        self.axes.images[0].set_data(data)
        self.canvas.draw()