CnSvgBigRenderer.java 文件源码

java
阅读 32 收藏 0 点赞 0 评论 0

项目:ChinaMapInfoView 作者:
private void renderGo(Canvas canvas, ColorFilter filter, Paint paint, int i) {
    if (i >= 0 && i <= 8) {
        renderByProvince1(i);
    } else if (i >= 9 && i <= 19) {
        renderByProvince2(i);
    } else if (i >= 20 && i <= 29) {
        renderByProvince3(i);
    } else if (i >= 29 && i <= 33) {
        renderByProvince4(i);
    }
    mRenderPath.addPath(mPath, mFinalPathMatrix);
    paint.setStrokeJoin(Paint.Join.MITER);
    paint.setStrokeCap(Paint.Cap.BUTT);
    paint.setStrokeMiter(4.0f);
    paint.setColorFilter(filter);
    canvas.drawPath(mRenderPath, paint);

    // Region
    mRegion = mRegionList.get(i);
    mRegion.setPath(mRenderPath, mGlobalRegion);
    mRegionList.set(i, mRegion);

    mPath.reset();
    mRenderPath.reset();

    mFinalPathMatrix.setValues(
            new float[]{1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f}
    );
    mFinalPathMatrix.postScale(scaleX, scaleY);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号