Draws the checked state.

@param canvas
@param w
@param h
198971
protected void drawCheckedState(Canvas canvas, int w, int h) {
        int x = w / 2;
        int y = h / 2;

        canvas.drawCircle(x, y,
                mRadius - (mShadowRadius * 1.5f),
                mCheckedBackgroundPaint);
        canvas.save();

        int shortStrokeHeight = (int) (mLongStrokeHeight * .4f);
        int halfH = (int) (mLongStrokeHeight * .5f);
        int offset = (int)(shortStrokeHeight * .3f);
        int sx = x + offset;
        int sy = y - offset;
        mPath.reset();
        mPath.moveTo(sx, sy - halfH);
        mPath.lineTo(sx, sy + halfH); // draw long stroke
        mPath.moveTo(sx + (getCheckMarkStrokeWidthInPixels() * .5f), sy + halfH);
        mPath.lineTo(sx - shortStrokeHeight, sy + halfH); // draw short stroke

        // Rotates the canvas to draw an angled check mark
        canvas.rotate(45f, x, y);
        canvas.drawPath(mPath, mCheckMarkPaint);
        // Restore the canvas to previously saved state
        canvas.restore();
    }
1022774
public void draw(Graphics2D g) {
		if (needsRefresh)
			refreshCurve();
		g.draw(curve); // Draws the main part of the arrow.
		drawArrow(g, end, control); // Draws the arrow head.
		drawText(g);
	}
564390
public void drawRect(int x, int y, int w, int h, Color c) {
        int color = c.getRGB();
        for (int i = x; i < x + w; i++) {
            setIntColor(i, y, color);
            setIntColor(i, y + (h - 1), color);
        }

        for (int i = y; i < y + h; i++) {
            setIntColor(x, i, color);
            setIntColor(x + (w - 1), i, color);
        }
    }
9320
function drawHandles() {
            let handleFillColor = colorHelper.colorSchemasHuman.grey[1];

            // Styling
            handle = chartBrush
                        .selectAll('.handle.brush-rect')
                        .style('fill', handleFillColor);
        }
92682
public void drawBottom(View view, Canvas c) {
        int left = view.getLeft() - mWidth;
        int top = view.getBottom();
        int right = view.getRight() + mWidth;
        int bottom = top + mHeight;
        mDivider.setBounds(left, top, right, bottom);
        mDivider.draw(c);
    }
503102
public void draw(GraphicContext graphicContext) {
        if (!this.visible) {
            return;
        }

        if (this.mapViewDimension.getDimension() == null) {
            return;
        }

        if (this.isRedrawNecessary()) {
            redraw(this.mapScaleCanvas);
            this.redrawNeeded = false;
        }

        int positionLeft = calculatePositionLeft(0, this.mapViewDimension.getDimension().width, this.mapScaleBitmap.getWidth());
        int positionTop = calculatePositionTop(0, this.mapViewDimension.getDimension().height, this.mapScaleBitmap.getHeight());

        graphicContext.drawBitmap(this.mapScaleBitmap, positionLeft, positionTop);
    }
1367313
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WPanel panel = (WPanel) component;
		XmlStringBuilder xml = renderContext.getWriter();
		BorderLayout layout = (BorderLayout) panel.getLayout();
		Size hgap = layout.getHorizontalGap();
		String hgapString = hgap == null ? null : hgap.toString();
		Size vgap = layout.getVerticalGap();
		String vgapString = vgap == null ? null : vgap.toString();

		xml.appendTagOpen("ui:borderlayout");

		xml.appendOptionalAttribute("hgap", hgapString);
		xml.appendOptionalAttribute("vgap", vgapString);

		xml.appendClose();

		// Fetch the children and their constraints.
		final int childCount = panel.getChildCount();
		List<Duplet<WComponent, BorderLayoutConstraint>> children = new ArrayList<>(childCount);

		for (int i = 0; i < childCount; i++) {
			WComponent child = panel.getChildAt(i);
			children.add(new Duplet<>(child, getConstraints(panel, child)));
		}

		// Now paint them
		paintChildrenWithConstraint(children, renderContext, BorderLayout.NORTH);
		paintChildrenWithConstraint(children, renderContext, BorderLayout.EAST);
		paintChildrenWithConstraint(children, renderContext, BorderLayout.SOUTH);
		paintChildrenWithConstraint(children, renderContext, BorderLayout.WEST);
		paintChildrenWithConstraint(children, renderContext, BorderLayout.CENTER);

		xml.appendEndTag("ui:borderlayout");
	}
590408
public void setBounds(int x, int y, int w, int h) {

        super.setBounds(x, y, w, h);

        iSbHeight = sbHoriz.getPreferredSize().height;
        iSbWidth  = sbVert.getPreferredSize().width;
        iHeight   = h - iSbHeight;
        iWidth    = w - iSbWidth;

        sbHoriz.setBounds(0, iHeight, iWidth, iSbHeight);
        sbVert.setBounds(iWidth, 0, iSbWidth, iHeight);
        adjustScroll();

        iImage = null;

        repaint();
    }
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();
    }
432159
@Override
	protected void onDrawFrame(SurfaceView view, Canvas canvas) {
		super.onDrawFrame(view, canvas);

		// Display info on the image being process and how fast input camera
		// stream (probably in YUV420) is converted into a BoofCV format
		int width = bitmap.getWidth();
		int height = bitmap.getHeight();
		canvas.drawText(String.format(Locale.getDefault(),
				"%d x %d Convert: %4.1f (ms)",
				width,height,periodConvert.getAverage()),
				0,120,paintText);
		canvas.drawText(String.format(Locale.getDefault(),
				"detector: %4.1f (ms)",timeDetection.getAverage()),
				180,170,paintText);


		// This line is magical and will save you hours/days of anguish
		// What it does is correctly convert the coordinate system from
		// image pixels that were processed into display coordinates
		// taking in account rotations and weird CCD layouts
		canvas.concat(imageToView);

		// Draw the bounding squares around the QR Codes
		synchronized (foundQR) {
			for (int foundIdx = 0; foundIdx < foundQR.size(); foundIdx++) {
				renderPolygon(foundQR.get(foundIdx),path,canvas,colorDetected);
			}
			if( foundQR.size() > 0 )
				textMessageView.setText(message);
		}

		// Pro tip: Run in app fast or release mode for a dramatic speed up!
		// In Android Studio expand "Build Variants" tab on left.
	}
110216
@Override
    public void paint(IReaction reaction, IDrawVisitor drawVisitor, Rectangle2D bounds, boolean resetCenter) {

        // calculate the bounds
        Rectangle2D modelBounds = BoundsCalculator.calculateBounds(reaction);

        this.setupTransformToFit(bounds, modelBounds, AverageBondLengthCalculator.calculateAverageBondLength(reaction),
                resetCenter);

        // generate the elements
        IRenderingElement diagram = this.generateDiagram(reaction);

        // paint it
        this.paint(drawVisitor, diagram);
    }
45172
@Override
	protected void onDrawFrame(SurfaceView view, Canvas canvas) {
		super.onDrawFrame(view, canvas);

		// Display info on the image being process and how fast input camera
		// stream (probably in YUV420) is converted into a BoofCV format
		int width = bitmap.getWidth();
		int height = bitmap.getHeight();
		canvas.drawText(String.format(Locale.getDefault(),
				"%d x %d Convert: %4.1f (ms)",
				width,height,periodConvert.getAverage()),
				0,120,paintText);

		// Pro tip: Run in app fast or release mode for a dramatic speed up!
		// In Android Studio expand "Build Variants" tab on left.
	}
1206940
private void paintCheckIconEnabledAndSelected(Graphics2D g, int width, int height) {
        Shape s = shapeGenerator.createCheckMark(0, 0, width, height);
        g.setPaint(iconEnabledSelected);
        g.fill(s);
    }
796608
private void checkboxDrawPointsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkboxDrawPointsActionPerformed
        visualizer.setPointLayerVisibility(checkboxDrawPoints.isSelected());
    }
1268977
@Override
	protected void onDraw(Canvas canvas) {

		if (adaptedImage != null)
			canvas.drawBitmap(adaptedImage, 0, 0, paint);

	}
1230827
public void setChecked(boolean checked) {
        setChecked(checked ? CheckableDrawable.CheckedState.CHECKED : CheckableDrawable.CheckedState.UNCHECKED);
    }
1166320
@Override
    public void draw(Canvas canvas) {
        drawSpacings(canvas);
        drawBaselineGrid(canvas);
        drawKeylines(canvas);
    }