Path isEmpty - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Path isEmpty method.

This code example shows how to use the following methods:isEmpty, lineTo, moveTo
		} 
	} 
	 
	public void addPoint(float x, float y) {
		y = 1 - y;
		if (path.isEmpty()) {
			path.moveTo(x, y);
		} 
		path.lineTo(x, y);
		minY = Math.min(minY, y);
		maxY = Math.max(maxY, y);
	} 
	 
	public void resetPath() { 
		path.reset();
		minY = Float.POSITIVE_INFINITY;
		maxY = Float.NEGATIVE_INFINITY;
	} 
} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:close, isEmpty, lineTo, moveTo, reset
		// 计算中心点, 用 mBoudsRect.centerX() 代替 
		// mCentrePoint.x = (l + r) / 2f; 
		// mCentrePoint.y = (t + b) / 2f; 
 
		// 初始化裁剪区域 
		mClipPath.reset();
		mClipPath.moveTo(l, t);
		mClipPath.lineTo(r, t);
		mClipPath.lineTo(r, b);
		mClipPath.lineTo(l, b);
		mClipPath.close();
 
		// 设置绘制目标坐标 
		initSrcRect(); 
 
		GLogger.i(TAG, "layout mBoundsRect = is Rect :" + !mBoundsRect.isEmpty() + "," + mBoundsRect.toString() + ", mBoundsBL : " + mBoundsRect.width() / mBoundsRect.height() +", mClipPath.isEmpty() = " + mClipPath.isEmpty());
		// GLogger.i(TAG, "layout mClipPath.isEmpty() = " + mClipPath.isEmpty() 
		// + ", is BoundsRest : " + mClipPath.isRect(mBoundsRect)); 
		GLogger.i(TAG, "layout mClipPath.isEmpty() = " + mClipPath.isEmpty());
	} 

5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:isEmpty, lineTo, moveTo
		} 
	} 
	 
	public void addPoint(float x, float y) {
		y = 1 - y;
		if (path.isEmpty()) {
			path.moveTo(x, y);
		} 
		path.lineTo(x, y);
		minY = Math.min(minY, y);
		maxY = Math.max(maxY, y);
	} 
	 
	public void resetPath() { 
		path.reset();
		minY = Float.POSITIVE_INFINITY;
		maxY = Float.NEGATIVE_INFINITY;
	} 
} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:isEmpty
		 
		final int stroke = mStrokePaint.getAlpha();
		final int fill = mFillPaint.getAlpha();
		final int text = mTextPaint.getAlpha();
		 
		if ((mStrokePath.isEmpty() || stroke == 0) && fill == 0 && (mText == null || text == 0)) {
			return PixelFormat.TRANSPARENT;
		} else if ((mStrokePath.isEmpty() || stroke == 255) && fill == 255
				&& (mText == null || text == 255)) {
			return PixelFormat.OPAQUE;
		} else { 
			return PixelFormat.TRANSLUCENT;
		} 
	} 
	 
	/** 
	 * No color filter. 
	 */ 
	@Override 
	public void setColorFilter(ColorFilter cf) {
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:isEmpty
		} 
		 
		canvas.drawPath(mFillPath, mFillPaint);
		 
		// no fill path == no indicator at all 
		if (mIndicatorFillPath.isEmpty()) {
			if (mStrokeWidth > 0) {
				canvas.drawPath(mStrokePath, mStrokePaint);
			} 
			 
			return; 
		} 
		 
		final float iP = mIndicatorPosition;
		final float iW = mIndicatorWidth;
		final float cR = mCornerRadius;
		final float sW = mStrokeWidth;
		final float iVSW = mIndicatorVerticalStrokeWidth;
		 
		float offset;

5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:isEmpty
        super.onDraw(canvas);
 
        if (!mRectF.isEmpty()) {
            canvas.drawRect(mRectF, mRectPaint);
        } 
        if (!mPath.isEmpty()) {
            canvas.drawPath(mPath, mPathPaint);
        } 
 
        invalidate();
    } 
 
    // ------------------------------------------------------------------------ 
    // Accessor methods 
    // ------------------------------------------------------------------------ 
 
    public float[] getPathPoints() { 
        int size = mPathPoints.size();
        float[] floatArray = new float[size];
        for (int i = 0; i < size; ++i) {
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:isEmpty
    public void onDraw(Canvas canvas) {
        super.onDraw(canvas);
 
        if (!mRectF.isEmpty())
            canvas.drawRect(mRectF, mRectPaint);
        if (!mPath.isEmpty())
            canvas.drawPath(mPath, mPathPaint);
 
        invalidate();
    } 
 
    // ------------------------------------------------------------------------ 
    // Accessor methods 
    // ------------------------------------------------------------------------ 
 
    public float[] getPathPoints() { 
        final int size = mPathPoints.size();
        float[] floatArray = new float[size];
        for (int i = 0; i < size; ++i) {
            final Float f = mPathPoints.get(i);
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:isEmpty
			} 
		} 
	} 
 
	public static boolean ifWrite() { 
		return !path.isEmpty();
	} 
 
} 
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:isEmpty
			} 
		} 
	} 
 
	private void drawPaintingPaths(Canvas canvas) {
		if (this.currentPaintingPath != null && ! this.currentPaintingPath.isEmpty()) {
			canvas.drawPath(this.currentPaintingPath, this.paintingPaint);
		} 
	} 
 
	private void drawTracking(Canvas canvas, float originX, float originY, float chartWidth, float chartHeight) {
		if (this.trackingValueX > originX && this.trackingValueX - originX < chartWidth && this.preparedData != null) {
			final float step = chartWidth / (float) (this.data.length -1);
			final int index = (int) ((this.trackingValueX - originX) / step);
			final float yValue = chartHeight - preparedData[index] + OFFSET;
 
			final int padding = (int) (SCALE * 4);
			// vertical lines 
			canvas.drawLine(this.trackingValueX, OFFSET, this.trackingValueX, yValue - padding, this.paintingPaint);
			canvas.drawLine(this.trackingValueX, yValue + padding, this.trackingValueX, originY, this.paintingPaint);
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:isEmpty
width = getWidth();
    		height = getHeight();
    	} 
 
    	if (path.isEmpty()==false)
    		canvas.drawPath(path, paint);
    } 
     
    public void pushPath(long time, float voltage)
    {     
    	float x = (float)(time - minTime) * scalingX;
    	    	 
    	if (time==minTime)
    		path.moveTo((float)x, (float)(max-voltage)*scalingY);
    	else 
    		path.lineTo((float)x, (float)(max-voltage)*scalingY);
    } 
     
    public void setMinMax(float min, float max, long minX, long maxX)
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related Path isEmpty Questions & Answers:

isEmpty Method Overview
Returns true if the path is empty (contains no lines or curves)
See Code Examples for other Android Path Methods: