Draw the field, usually for debugging purposes.
 @see Ashton::Texture#draw
332733
def draw(x, y, z, options = {})
      options = {
          mode: :add,
      }.merge! options

      $window.scale @scale do
        @field.draw x, y, z, options
      end

      nil
    end
1235816
def draw_point(self, x, y):
        
        check_int_err(lib.SDL_RenderDrawPoint(self._ptr, x, y))
254136
public void drawImage(Image image, float x, float y, Color col) {
		predraw();
		image.draw(x, y, col);
		currentColor.bind();
		postdraw();
	}
1166320
@Override
    public void draw(Canvas canvas) {
        drawSpacings(canvas);
        drawBaselineGrid(canvas);
        drawKeylines(canvas);
    }
794288
def draw_line(x1, y1, x2, y2)
      @context.drawLine(x1, y1, x2, y2)
    end
410611
@Override
    public void draw(@NonNull Canvas canvas) {
        pruneRipples();

        // Clip to the dirty bounds, which will be the drawable bounds if we
        // have a mask or content and the ripple bounds if we're projecting.
        final Rect bounds = getDirtyBounds();
        final int saveCount = canvas.save();
        canvas.clipRect(bounds);

        drawContent(canvas);
        drawBackgroundAndRipples(canvas);

        canvas.restoreToCount(saveCount);
    }
461763
def draw(self):
        
        # Assumes that self.index has been set earlier (typically in update method)
        # it is used as the index of the current image/endTime/loc
        theImage = self.imagesList[self.index]  # choose the image to show

        if theImage is None:  # if there is no image to show
            return

        if self.visible:
            theOffset = self.offsetsList[self.index]
            theLoc = ((self.loc[0] + theOffset[0]), (self.loc[1] + theOffset[1]))
            self.window.blit(theImage, theLoc)
368213
public void draw() {
		//=================================================================
		//Now plot the STP with the Utility.PlotSTPTemporalModule class
		//=================================================================
		PlotSTPTemporalModule view;
		Toolkit tk = Toolkit.getDefaultToolkit();
		int xSize = ((int) tk.getScreenSize().getWidth());
		int ySize = ((int) tk.getScreenSize().getHeight());
		//int ySize = 500;

		//GIVE tm TO VISIUALIZER		
		view = new PlotSTPTemporalModule(this, xSize, ySize);
		JFrame myFrame = new JFrame("Simple Temporal Network");

		Container pane = myFrame.getContentPane();
		pane.setLayout(new BorderLayout());
		pane.add(view, BorderLayout.NORTH);
		myFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

		myFrame.setSize(xSize,ySize);

		myFrame.pack();
		myFrame.setVisible(true);

		view.touchLBUBNodes();
		//=================================================================
		//End STP plotting
		//=================================================================
	}
447561
private void drawTriangle(ShaderBuffer out1, float x1, float y1, float z1, float w1,
                              ShaderBuffer out2, float x2, float y2, float z2, float w2,
                              ShaderBuffer out3, float x3, float y3, float z3, float w3,
                              ShaderImplementation fragmentShader, ShaderBuffer fragmentIn, ShaderBuffer fragmentOut) {
        // (28).(4) (in bits) fixed-point coordinates
        final int fy1 = Math.round(y1 * 16);
        final int fy2 = Math.round(y2 * 16);
        final int fy3 = Math.round(y3 * 16);
        final int fx1 = Math.round(x1 * 16);
        final int fx2 = Math.round(x2 * 16);
        final int fx3 = Math.round(x3 * 16);
        // Deltas
        final int dx12 = fx1 - fx2;
        final int dx23 = fx2 - fx3;
        final int dx31 = fx3 - fx1;
        final int dy12 = fy1 - fy2;
        final int dy23 = fy2 - fy3;
        final int dy31 = fy3 - fy1;
        // Fixed-point deltas
        final int fdx12 = dx12 << 4;
        final int fdx23 = dx23 << 4;
        final int fdx31 = dx31 << 4;
        final int fdy12 = dy12 << 4;
        final int fdy23 = dy23 << 4;
        final int fdy31 = dy31 << 4;
        // Block size, standard 8x8 (must be power of two), here 2^3
        final int block = 1 << 3;
        // Bounding rectangle, start in the corner of the 8x8 block
        final int minX = Math.min(fx1, Math.min(fx2, fx3)) + 0xf >> 4 & ~(block - 1);
        final int maxX = Math.max(fx1, Math.max(fx2, fx3)) + 0xf >> 4;
        final int minY = Math.min(fy1, Math.min(fy2, fy3)) + 0xf >> 4 & ~(block - 1);
        final int maxY = Math.max(fy1, Math.max(fy2, fy3)) + 0xf >> 4;
        // Determinant of deltas to compute the normalized barycentric coordinates for interpolation
        final float det = dx23 * dy12 - dy23 * dx12;
        // Barycentric coordinates
        int c1 = dy12 * fx1 - dx12 * fy1;
        int c2 = dy23 * fx2 - dx23 * fy2;
        int c3 = dy31 * fx3 - dx31 * fy3;
        // Correct for fill convention
        if (dy12 < 0 || dy12 == 0 && dx12 > 0) {
            c1++;
        }
        if (dy23 < 0 || dy23 == 0 && dx23 > 0) {
            c2++;
        }
        if (dy31 < 0 || dy31 == 0 && dx31 > 0) {
            c3++;
        }
        // Loop through blocks
        for (int by = minY; by < maxY; by += block) {
            for (int bx = minX; bx < maxX; bx += block) {
                // Corners of block
                final int bx0 = bx << 4;
                final int bx1 = bx + block - 1 << 4;
                final int by0 = by << 4;
                final int by1 = by + block - 1 << 4;
                // Evaluate half-space functions
                final boolean a00 = c1 + dx12 * by0 - dy12 * bx0 <= 0;
                final boolean a10 = c1 + dx12 * by0 - dy12 * bx1 <= 0;
                final boolean a01 = c1 + dx12 * by1 - dy12 * bx0 <= 0;
                final boolean a11 = c1 + dx12 * by1 - dy12 * bx1 <= 0;
                final boolean b00 = c2 + dx23 * by0 - dy23 * bx0 <= 0;
                final boolean b10 = c2 + dx23 * by0 - dy23 * bx1 <= 0;
                final boolean b01 = c2 + dx23 * by1 - dy23 * bx0 <= 0;
                final boolean b11 = c2 + dx23 * by1 - dy23 * bx1 <= 0;
                final boolean c00 = c3 + dx31 * by0 - dy31 * bx0 <= 0;
                final boolean c10 = c3 + dx31 * by0 - dy31 * bx1 <= 0;
                final boolean c01 = c3 + dx31 * by1 - dy31 * bx0 <= 0;
                final boolean c11 = c3 + dx31 * by1 - dy31 * bx1 <= 0;
                // Skip the block when outside an edge
                if (a00 && a10 && a01 && a11 || b00 && b10 && b01 && b11 || c00 && c10 && c01 && c11) {
                    continue;
                }
                // Compute the barycentric coordinates
                int cy1 = c1 + dx12 * by0 - dy12 * bx0;
                int cy2 = c2 + dx23 * by0 - dy23 * bx0;
                int cy3 = c3 + dx31 * by0 - dy31 * bx0;
                // Iterate the block
                for (int y = by; y < by + block; y++) {
                    int cx1 = cy1;
                    int cx2 = cy2;
                    int cx3 = cy3;
                    for (int x = bx; x < bx + block; x++) {
                        // Only draw pixels inside the triangle
                        if (cx1 > 0 && cx2 > 0 && cx3 > 0) {
                            // Compute the normalized barycentric coordinates
                            final float t = cx1 / det;
                            final float r = cx2 / det;
                            final float s = 1 - t - r;
                            // Lerp the rest of the data using the barycentric coordinates
                            final float z = SoftwareUtil.baryLerp(z1, z2, z3, r, s, t);
                            final float w = SoftwareUtil.baryLerp(w1, w2, w3, r, s, t);
                            fragmentIn.clear();
                            fragmentIn.writeRaw(Float.floatToIntBits(x));
                            fragmentIn.writeRaw(Float.floatToIntBits(y));
                            fragmentIn.writeRaw(Float.floatToIntBits(z));
                            fragmentIn.writeRaw(Float.floatToIntBits(w));
                            out1.position(4);
                            out2.position(4);
                            out3.position(4);
                            SoftwareUtil.baryLerp(out1, out2, out3, r, s, t, 1, fragmentIn);
                            fragmentIn.flip();
                            // Shade and write the fragment
                            writeFragment(fragmentShader, fragmentIn, fragmentOut, x, y, z);
                        }
                        cx1 -= fdy12;
                        cx2 -= fdy23;
                        cx3 -= fdy31;
                    }
                    cy1 += fdx12;
                    cy2 += fdx23;
                    cy3 += fdx31;
                }
            }
        }
    }
997243
def draw(self):
        
        if __debug__: verbose.report('FigureCanvasAgg.draw', 'debug-annoying')

        self.renderer = self.get_renderer(cleared=True)
        # acquire a lock on the shared font cache
        RendererAgg.lock.acquire()

        try:
            self.figure.draw(self.renderer)
        finally:
            RendererAgg.lock.release()
297944
def draw(self):
        """"""

        cell_background_renderer = GridCellBackgroundCairoRenderer(
            self.context,
            self.code_array,
            self.key,
            self.rect,
            self.view_frozen)

        cell_content_renderer = GridCellContentCairoRenderer(
            self.context,
            self.code_array,
            self.key,
            self.rect,
            self.spell_check)

        cell_border_renderer = GridCellBorderCairoRenderer(
            self.context,
            self.code_array,
            self.key,
            self.rect)

        cell_background_renderer.draw()
        cell_content_renderer.draw()
        cell_border_renderer.draw()
138373
def draw
      drawns = []
      @options[:include].each { |n| drawns << n } unless @options[:include].nil?
      count = @options[:include] ? @options[:pick] - @options[:include].count : @options[:pick]
      count.times { drawns << pick(drawns) }
      drawns
    end
524376
function draw(renderer, container) {
         var translateX = this.pos.x + this.offset.x;
         var translateY = this.pos.y + this.offset.y; // translate the world coordinates by default to screen coordinates

         container.currentTransform.translate(-translateX, -translateY); // clip to camera bounds

         renderer.clipRect(0, 0, this.width, this.height);
         this.preDraw(renderer);
         container.preDraw(renderer); // draw all objects,
         // specifying the viewport as the rectangle area to redraw

         container.draw(renderer, this); // draw the viewport/camera effects

         this.drawFX(renderer);
         container.postDraw(renderer);
         this.postDraw(renderer); // translate the world coordinates by default to screen coordinates

         container.currentTransform.translate(translateX, translateY);
       }
264403
function paintField(ctx, location, field, range) {
  let count;
  let min = Number.MAX_VALUE;
  let max = Number.MIN_VALUE;

  const xOffset = location.x;
  const yOffset = location.y;
  const width = location.width;
  const height = location.height;
  const values = field.data;
  const size = values.length;
  const xValues = new Uint16Array(size);

  // Compute xValues and min/max
  count = size;
  while (count) {
    count -= 1;
    const value = values[count];
    min = Math.min(min, value);
    max = Math.max(max, value);
    xValues[count] = xOffset + Math.floor(width * (count / (size - 1)));
  }

  // Update range if any provided
  if (range) {
    min = range[0];
    max = range[1];
  }

  const scaleY = height / (max - min);

  function getY(idx) {
    let value = values[idx];
    value = value > min ? (value < max ? value : max) : min;
    return yOffset + height - Math.floor((value - min) * scaleY);
  }

  // Draw line
  ctx.beginPath();
  ctx.lineWidth = 1;
  ctx.strokeStyle = field.color;
  ctx.moveTo(xValues[0], getY(0));
  for (let idx = 1; idx < size; idx++) {
    if (Number.isNaN(values[idx])) {
      if (idx + 1 < size && !Number.isNaN(values[idx + 1])) {
        ctx.moveTo(xValues[idx + 1], getY(idx + 1));
      }
    } else {
      ctx.lineTo(xValues[idx], getY(idx));
    }
  }
  ctx.stroke();
}
961655
function() {
        const bounds = this._pixelBounds();
        const pixelSize = (bounds.max.x - bounds.min.x) / this._field.nCols;

        var stride = Math.max(
            1,
            Math.floor(1.2 * this.options.vectorSize / pixelSize)
        );

        const ctx = this._getDrawingContext();
        ctx.strokeStyle = this.options.color;

        var currentBounds = this._map.getBounds();

        for (var y = 0; y < this._field.height; y = y + stride) {
            for (var x = 0; x < this._field.width; x = x + stride) {
                let [lon, lat] = this._field._lonLatAtIndexes(x, y);
                let v = this._field.valueAt(lon, lat);
                let center = L.latLng(lat, lon);
                if (v !== null && currentBounds.contains(center)) {
                    let cell = new Cell(
                        center,
                        v,
                        this.cellXSize,
                        this.cellYSize
                    );
                    this._drawArrow(cell, ctx);
                }
            }
        }
    }
373615
public void draw(GraphicContext graphicContext) {
        /*
         * Swap bitmaps here (and only here).
         * Swapping is done when layer manager has finished. Else draw old bitmap again.
         * This draw() is always called when layer manager has finished. This ensures that the
         * last generated frame is always put on screen.
         */

        // FIXME: resetting the background color is redundant if the background color of the map view is already set
        graphicContext.fillColor(this.displayModel.getBackgroundColor());

        swapBitmaps();

        synchronized (this.matrix) {
            Bitmap b = this.odBitmap.lock();
            if (b != null) {
                graphicContext.drawBitmap(b, this.matrix);
            }
        }

        /*
         * Release here so destroy() can free resources
         */
        this.odBitmap.release();
    }
698238
def draw(self, mode, selection):
        
        if not self._linked:
            raise RuntimeError('Cannot draw program if code has not been set')
        # Init
        gl.check_error('Check before draw')
        mode = as_enum(mode)
        # Draw
        if len(selection) == 3:
            # Selection based on indices
            id_, gtype, count = selection
            if count:
                self._pre_draw()
                ibuf = self._parser.get_object(id_)
                ibuf.activate()
                gl.glDrawElements(mode, count, as_enum(gtype), None)
                ibuf.deactivate()
        else:
            # Selection based on start and count
            first, count = selection
            if count:
                self._pre_draw()
                gl.glDrawArrays(mode, first, count)
        # Wrap up
        gl.check_error('Check after draw')
        self._post_draw()