SVGAndroidRenderer.java 文件源码

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

项目:microMathematics 作者:
private void popLayer(SvgElement obj) {
    // If this is masked content, apply the mask now
    if (state.style.mask != null && state.directRendering) {
        // The masked content has been drawn, now we have to render the mask
        // to a separate canvas
        SVG.SvgObject ref = document.resolveIRI(state.style.mask);
        duplicateCanvas();
        renderMask((SVG.Mask) ref, obj);

        Bitmap maskedContent = processMaskBitmaps();

        // Retrieve the real canvas
        canvas = canvasStack.pop();
        canvas.save();
        // Reset the canvas matrix so that we can draw the maskedContent
        // exactly over the top of the root bitmap
        canvas.setMatrix(new Matrix());
        canvas.drawBitmap(maskedContent, 0, 0, state.fillPaint);
        maskedContent.recycle();
        canvas.restore();
    }

    statePop();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号