Performs an {@link View#onDraw(Canvas)} call on the given {@link View}.
345105
protected final void invokeOnDraw(View view, Canvas canvas) {
        final ViewProxy proxy = (ViewProxy) view;
        proxy.invokeOnDraw(canvas);
    }
858932
void onDrawEye(int eye, int swapChainIndex, boolean use_multiview) {
        mCurrentEye = eye;
        if (!(mSensoredScene == null || !mMainScene.equals(mSensoredScene))) {
            GVRCameraRig mainCameraRig = mMainScene.getMainCameraRig();

            if (use_multiview) {

                if (DEBUG_STATS) {
                    mTracerDrawEyes1.enter(); // this eye is drawn first
                    mTracerDrawEyes2.enter();
                }
                 GVRRenderTarget renderTarget = mRenderBundle.getRenderTarget(EYE.MULTIVIEW, swapChainIndex);
                 GVRCamera camera = mMainScene.getMainCameraRig().getCenterCamera();
                 GVRCamera left_camera = mMainScene.getMainCameraRig().getLeftCamera();
                 renderTarget.cullFromCamera(mMainScene, camera,mRenderBundle.getShaderManager());

                captureCenterEye(renderTarget, true);
                capture3DScreenShot(renderTarget, true);

                renderTarget.render(mMainScene, left_camera, mRenderBundle.getShaderManager(),mRenderBundle.getPostEffectRenderTextureA(),
                        mRenderBundle.getPostEffectRenderTextureB());

                captureRightEye(renderTarget, true);
                captureLeftEye(renderTarget, true);

                captureFinish();

                if (DEBUG_STATS) {
                    mTracerDrawEyes1.leave();
                    mTracerDrawEyes2.leave();
                }


            } else {

                if (eye == 1) {
                    if (DEBUG_STATS) {
                        mTracerDrawEyes1.enter();
                    }

                     GVRCamera rightCamera = mainCameraRig.getRightCamera();
                     GVRRenderTarget renderTarget = mRenderBundle.getRenderTarget(EYE.RIGHT, swapChainIndex);
                     renderTarget.render(mMainScene, rightCamera, mRenderBundle.getShaderManager(), mRenderBundle.getPostEffectRenderTextureA(),
                             mRenderBundle.getPostEffectRenderTextureB());
                    captureRightEye(renderTarget, false);

                    captureFinish();
                    if (DEBUG_STATS) {
                        mTracerDrawEyes1.leave();
                        mTracerDrawEyes.leave();
                    }
                } else {
                    if (DEBUG_STATS) {
                        mTracerDrawEyes1.leave();
                        mTracerDrawEyes.leave();
                    }


                    GVRRenderTarget renderTarget = mRenderBundle.getRenderTarget(EYE.LEFT, swapChainIndex);
                    GVRCamera leftCamera = mainCameraRig.getLeftCamera();

                    capture3DScreenShot(renderTarget, false);

                    renderTarget.cullFromCamera(mMainScene, mainCameraRig.getCenterCamera(), mRenderBundle.getShaderManager());
                    captureCenterEye(renderTarget, false);
                    renderTarget.render(mMainScene, leftCamera, mRenderBundle.getShaderManager(), mRenderBundle.getPostEffectRenderTextureA(), mRenderBundle.getPostEffectRenderTextureB());

                    captureLeftEye(renderTarget, false);

                    if (DEBUG_STATS) {
                        mTracerDrawEyes2.leave();
                    }
                }
             }
        }
    }
928305
public void onClickDir(@NonNull View view, @NonNull DirViewHolder viewHolder) {
        if (isDir(viewHolder.file)) {
            goToDir(viewHolder.file);
        }
    }
920717
@Override
    protected void onGraphDraw(Canvas _Canvas) {
        super.onGraphDraw(_Canvas);
        if(mUseOverlapFill) {
            mLinePaint.setStyle(Paint.Style.FILL);
        }
        else {
            mLinePaint.setStrokeWidth(mLineStroke);
            mLinePaint.setStyle(Paint.Style.STROKE);
        }

        _Canvas.concat(mDrawMatrix);
        if(mHasNegativeValues) {
            _Canvas.translate(0, -mNegativeOffset);
        }

        // drawing of lines
        for (ValueLineSeries series : mSeries) {
            mLinePaint.setColor(series.getColor());
            _Canvas.drawPath(series.getPath(), mLinePaint);
        }
    }
816220
public void onDraw() {
		map.getVectorContext().setController(parent, getId(), controller, Event.MOUSEEVENTS);
		map.getVectorContext().setCursor(parent, getId(), Cursor.POINTER.getValue());
	}
219362
@Override public void onViewPositionChanged(View changedView, int left, int top, int dx, int dy) {
    if (draggableView.isDragViewAtBottom()) {
      draggableView.changeDragViewViewAlpha();
    } else {
      draggableView.restoreAlpha();
      draggableView.changeDragViewScale();
      draggableView.changeDragViewPosition();
      draggableView.changeSecondViewAlpha();
      draggableView.changeSecondViewPosition();
      draggableView.changeBackgroundAlpha();
    }
  }
846152
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
    public void animate(View view) {
        if (!expanded) {
            mIv.setImageDrawable(mSearchToBar);
            mSearchToBar.start();
            mIv.animate().translationX(0f).setDuration(mDuration).setInterpolator(mInterp);
            //text.animate().alpha(1f).setStartDelay(duration - 100).setDuration(100).setInterpolator(interp);
        } else {
            mIv.setImageDrawable(mBarToSearch);
            mBarToSearch.start();
            mIv.animate().translationX(mOffset).setDuration(mDuration).setInterpolator(mInterp);
            //text.setAlpha(0f);
        }
        expanded = !expanded;
    }
1043139
public void draw(){
        if (!mIsVisible)
            return;
        try {
            MapView.LayoutParams lp = new MapView.LayoutParams(
                    MapView.LayoutParams.WRAP_CONTENT,
                    MapView.LayoutParams.WRAP_CONTENT,
                    mPosition, MapView.LayoutParams.BOTTOM_CENTER,
                    mOffsetX, mOffsetY);
            mMapView.updateViewLayout(mView, lp); // supposed to work only on the UI Thread
        } catch(Exception e) {
            if (MapSnapshot.isUIThread()) {
                throw e;
            }
            // in order to avoid a CalledFromWrongThreadException crash
        }
    }
1130821
public static void tint(View view, Tint tint) {
        final ColorStateList color = tint.getColor(view.getContext());

        if (view instanceof ImageView) {
            tint(((ImageView) view).getDrawable(), color);
        } else if (view instanceof TextView) {
            TextView text = (TextView) view;
            Drawable[] comp = text.getCompoundDrawables();
            for (int i = 0; i < comp.length; i++) {
                if (comp[i] != null) {
                    comp[i] = tint(comp[i], color);
                }
            }
            text.setCompoundDrawablesWithIntrinsicBounds(comp[0], comp[1], comp[2], comp[3]);
        } else {
            throw new IllegalArgumentException("Unsupported view type");
        }
    }
474312
@Override
    public void draw(@NonNull Canvas canvas) {
        if (mIcon == null && mPlainIcon == null) return;

        Rect viewBounds = getBounds();

        updatePaddingBounds(viewBounds);
        updateTextSize(viewBounds);
        offsetIcon(viewBounds);

        if (mRoundedCornerRy > -1 && mRoundedCornerRx > -1) {
            if (mDrawBackgroundContour) {
                float halfContourSize = mBackgroundContourWidth / 2f;
                RectF rectF = new RectF(
                        halfContourSize,
                        halfContourSize,
                        viewBounds.width() - halfContourSize,
                        viewBounds.height() - halfContourSize);
                canvas.drawRoundRect(
                        rectF,
                        mRoundedCornerRx,
                        mRoundedCornerRy,
                        mBackgroundBrush.getPaint());
                canvas.drawRoundRect(
                        rectF,
                        mRoundedCornerRx,
                        mRoundedCornerRy,
                        mBackgroundContourBrush.getPaint());
            } else {
                RectF rectF = new RectF(0, 0, viewBounds.width(), viewBounds.height());
                canvas.drawRoundRect(
                        rectF,
                        mRoundedCornerRx,
                        mRoundedCornerRy,
                        mBackgroundBrush.getPaint());
            }
        }

        try {
            mPath.close();
        } catch (Exception ignored) {
        }

        if (mDrawContour) {
            canvas.drawPath(mPath, mContourBrush.getPaint());
        }

        mIconBrush.getPaint().setColorFilter(mColorFilter == null ? mTintFilter : mColorFilter);

        canvas.drawPath(mPath, mIconBrush.getPaint());
    }
1088688
@Override
	public void onDoubleClick(DoubleClickEvent event) {
		if (event.getNativeButton() != Event.BUTTON_RIGHT) {
			handler.onDraw(geometry);
		}
	}
1198619
private void initializeDraggableView() {
    Handler handler = new Handler();
    handler.postDelayed(new Runnable() {
      @Override public void run() {
        draggableView.setVisibility(View.GONE);
        draggableView.closeToRight();
      }
    }, DELAY_MILLIS);
  }
172433
@Override
	public void draw(Canvas canvas) {
		float width = canvas.getWidth();
		float margin = (width / 3) + mState.mMarginSide;
		float posY = canvas.getHeight() - mState.mMarginBottom;
		canvas.drawLine(margin, posY, width - margin, posY, mPaint);
	}
1339077
public static void apply(@NonNull View view) {
        if (view.isInEditMode()) {
            return;
        }

        final AssetManager assets = view.getContext().getAssets();
        if (view instanceof TextView) {
            setTypeface((TextView) view, getFontFromTag(assets, view, false));
        } else if (view instanceof ViewGroup) {
            applyAllRecursively((ViewGroup) view, assets);
        }
    }
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);
    }
1049219
protected boolean onDrawItem(final Canvas canvas, final Item item, final Point curScreenCoords,
			final Projection pProjection) {

		

		final int state = (mDrawFocusedItem && (mFocusedItem == item) ? OverlayItem.ITEM_STATE_FOCUSED_MASK
				: 0);
		final Drawable marker = (item.getMarker(state) == null) ? getDefaultMarker(state) : item
				.getMarker(state);
		final HotspotPlace hotspot = item.getMarkerHotspot();

		boundToHotspot(marker, hotspot);

		int x = mCurScreenCoords.x;
		int y = mCurScreenCoords.y;

		marker.copyBounds(mRect);
		mRect.offset(x, y);
		RectL.getBounds(mRect, x, y, pProjection.getOrientation(), mOrientedMarkerRect);
		final boolean displayed = Rect.intersects(mOrientedMarkerRect, canvas.getClipBounds());
		if (displayed) {
			if (pProjection.getOrientation() != 0) { // optimization: step 1/2
				canvas.save();
				canvas.rotate(-pProjection.getOrientation(), x, y);
			}
			marker.setBounds(mRect);
			marker.draw(canvas);
			if (pProjection.getOrientation() != 0) { // optimization: step 2/2
				canvas.restore();
			}
		}

		return displayed;
	}
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.
	}