當前位置: 首頁>>代碼示例>>Java>>正文


Java Path.addPath方法代碼示例

本文整理匯總了Java中android.graphics.Path.addPath方法的典型用法代碼示例。如果您正苦於以下問題:Java Path.addPath方法的具體用法?Java Path.addPath怎麽用?Java Path.addPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.graphics.Path的用法示例。


在下文中一共展示了Path.addPath方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addObjectToClip

import android.graphics.Path; //導入方法依賴的package包/類
private void addObjectToClip(SVG.Path obj, Path combinedPath,
		Matrix combinedPathMatrix) {
	updateStyleForElement(state, obj);

	if (!display())
		return;
	if (!visible())
		return;

	if (obj.transform != null)
		combinedPathMatrix.preConcat(obj.transform);

	Path path = (new PathConverter(obj.d)).getPath();

	if (obj.boundingBox == null) {
		obj.boundingBox = calculatePathBounds(path);
	}
	checkForClipPath(obj);

	// path.setFillType(getClipRuleFromState());
	combinedPath.setFillType(getClipRuleFromState());
	combinedPath.addPath(path, combinedPathMatrix);
}
 
開發者ID:mkulesh,項目名稱:microMathematics,代碼行數:24,代碼來源:SVGAndroidRenderer.java

示例2: drawUnselected

import android.graphics.Path; //導入方法依賴的package包/類
private void drawUnselected(Canvas canvas) {

        combinedUnselectedPath.rewind();

        // draw any settled, revealing or joining dots
        for (int page = 0; page < pageCount; page++) {
            int nextXIndex = page == pageCount - 1 ? page : page + 1;
            Path unselectedPath = getUnselectedPath(page,
                    dotCenterX[page],
                    dotCenterX[nextXIndex],
                    page == pageCount - 1 ? INVALID_FRACTION : joiningFractions[page],
                    dotRevealFractions[page]);
            unselectedPath.addPath(combinedUnselectedPath);
            combinedUnselectedPath.addPath(unselectedPath);
        }
        // draw any retreating joins
        if (retreatingJoinX1 != INVALID_FRACTION) {
            Path retreatingJoinPath = getRetreatingJoinPath();
            combinedUnselectedPath.addPath(retreatingJoinPath);
        }

        canvas.drawPath(combinedUnselectedPath, unselectedPaint);
    }
 
開發者ID:jumaallan,項目名稱:AndelaTrackChallenge,代碼行數:24,代碼來源:InkPageIndicator.java

示例3: testPathForCan

import android.graphics.Path; //導入方法依賴的package包/類
private void testPathForCan(Canvas canvas) {
        canvas.translate(mWidth / 2, mHeight / 2);  // 移動坐標係到屏幕中心
//        canvas.scale(1, -1);                         // <-- 注意 翻轉y坐標軸

        Path path = new Path();
        Path src = new Path();

        path.addRect(-200, -200, 200, 200, Path.Direction.CW);
        src.addCircle(0, 0, 100, Path.Direction.CW);

        path.addPath(src, 0, 200);
        paint.setColor(Color.BLACK);           // 繪製合並後的路徑
        canvas.drawPath(path, paint);
    }
 
開發者ID:lixiaodaoaaa,項目名稱:ColumnAnimViewProject,代碼行數:15,代碼來源:CanvasTestView.java

示例4: drawUnselected

import android.graphics.Path; //導入方法依賴的package包/類
private void drawUnselected(Canvas canvas) {
    combinedUnselectedPath.rewind();

    for (int page = 0; page < pageCount; page++) {
        int nextXIndex;

        if (page == pageCount - 1) {
            nextXIndex = page;
        } else {
            nextXIndex = page + 1;
        }

        Path unselectedPath = getUnselectedPath(page,
                dotCenterX[page],
                dotCenterX[nextXIndex],
                page == pageCount - 1 ? INVALID_FRACTION : joiningFractions[page],
                dotRevealFractions[page]);

        unselectedPath.addPath(combinedUnselectedPath);
        combinedUnselectedPath.addPath(unselectedPath);
    }

    if (retreatingJoinX1 != INVALID_FRACTION) {
        Path retreatingJoinPath = getRetreatingJoinPath();
        combinedUnselectedPath.addPath(retreatingJoinPath);
    }

    canvas.drawPath(combinedUnselectedPath, unselectedPaint);
}
 
開發者ID:nonzeroapps,項目名稱:whatisnewdialog,代碼行數:30,代碼來源:InkPageIndicator.java

示例5: fillPath

import android.graphics.Path; //導入方法依賴的package包/類
void fillPath(Path path) {
    base.fillPath(path);
    path.addPath(wawes.get(0).getPath());
    path.addPath(wawes.get(1).getPath());
}
 
開發者ID:shellljx,項目名稱:FuckingVolumeSlider,代碼行數:6,代碼來源:Speaker.java


注:本文中的android.graphics.Path.addPath方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。