当前位置: 首页>>代码示例>>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;未经允许,请勿转载。