当前位置: 首页>>代码示例>>Java>>正文


Java Line.hasLines方法代码示例

本文整理汇总了Java中lecho.lib.hellocharts.model.Line.hasLines方法的典型用法代码示例。如果您正苦于以下问题:Java Line.hasLines方法的具体用法?Java Line.hasLines怎么用?Java Line.hasLines使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在lecho.lib.hellocharts.model.Line的用法示例。


在下文中一共展示了Line.hasLines方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: draw

import lecho.lib.hellocharts.model.Line; //导入方法依赖的package包/类
public void draw(Canvas canvas) {
    Canvas drawCanvas;
    LineChartData data = this.dataProvider.getLineChartData();
    if (this.softwareBitmap != null) {
        drawCanvas = this.softwareCanvas;
        drawCanvas.drawColor(0, Mode.CLEAR);
    } else {
        drawCanvas = canvas;
    }
    this.targetWeight = this.lineChartView.getTargetWeight();
    if (this.targetWeight > 0.0f) {
        drawTargetWeightPath(drawCanvas);
    }
    for (Line line : data.getLines()) {
        if (line.hasLines()) {
            if (line.isCubic()) {
                drawSmoothPath(drawCanvas, line);
            } else if (line.isSquare()) {
                drawSquarePath(drawCanvas, line);
            } else {
                drawPath(drawCanvas, line);
            }
        }
    }
    if (this.softwareBitmap != null) {
        canvas.drawBitmap(this.softwareBitmap, 0.0f, 0.0f, null);
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:29,代码来源:LineChartRenderer.java

示例2: draw

import lecho.lib.hellocharts.model.Line; //导入方法依赖的package包/类
@Override
public void draw(Canvas canvas) {
    final LineChartData data = dataProvider.getLineChartData();

    final Canvas drawCanvas;

    // softwareBitmap can be null if chart is rendered in layout editor. In that case use default canvas and not
    // softwareCanvas.
    if (null != softwareBitmap) {
        drawCanvas = softwareCanvas;
        drawCanvas.drawColor(Color.TRANSPARENT, Mode.CLEAR);
    } else {
        drawCanvas = canvas;
    }

    for (Line line : data.getLines()) {
        if (line.hasLines()) {
            if (line.isCubic()) {
                drawSmoothPath(drawCanvas, line);
            } else if (line.isSquare()) {
                drawSquarePath(drawCanvas, line);
            } else {
                drawPath(drawCanvas, line);
            }
        }
    }

    if (null != softwareBitmap) {
        canvas.drawBitmap(softwareBitmap, 0, 0, null);
    }
}
 
开发者ID:lecho,项目名称:hellocharts-android,代码行数:32,代码来源:LineChartRenderer.java


注:本文中的lecho.lib.hellocharts.model.Line.hasLines方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。