本文整理汇总了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);
}
}
示例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);
}
}