SVGPaint.java 文件源码

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

项目:Push2Display 作者:
/**
 * @param paint Paint to be converted to SVG
 * @return a descriptor of the corresponding SVG paint
 */
public SVGPaintDescriptor toSVG(Paint paint){
    // we first try the extension handler because we may
    // want to override the way a Paint is managed!
    SVGPaintDescriptor paintDesc = svgCustomPaint.toSVG(paint);

    if (paintDesc == null) {
        if (paint instanceof Color)
            paintDesc = SVGColor.toSVG((Color)paint, generatorContext);
        else if (paint instanceof GradientPaint)
            paintDesc = svgLinearGradient.toSVG((GradientPaint)paint);
        else if (paint instanceof TexturePaint)
            paintDesc = svgTexturePaint.toSVG((TexturePaint)paint);
    }

    return paintDesc;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号