本文整理了Java中com.github.mikephil.charting.components.YAxis.getZeroLineWidth()
方法的一些代码示例,展示了YAxis.getZeroLineWidth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YAxis.getZeroLineWidth()
方法的具体详情如下:
包路径:com.github.mikephil.charting.components.YAxis
类名称:YAxis
方法名:getZeroLineWidth
暂无
代码示例来源:origin: PhilJay/MPAndroidChart
@Override
protected void drawZeroLine(Canvas c) {
int clipRestoreCount = c.save();
mZeroLineClippingRect.set(mViewPortHandler.getContentRect());
mZeroLineClippingRect.inset(-mYAxis.getZeroLineWidth(), 0.f);
c.clipRect(mLimitLineClippingRect);
// draw zero line
MPPointD pos = mTrans.getPixelForValues(0f, 0f);
mZeroLinePaint.setColor(mYAxis.getZeroLineColor());
mZeroLinePaint.setStrokeWidth(mYAxis.getZeroLineWidth());
Path zeroLinePath = mDrawZeroLinePathBuffer;
zeroLinePath.reset();
zeroLinePath.moveTo((float) pos.x - 1, mViewPortHandler.contentTop());
zeroLinePath.lineTo((float) pos.x - 1, mViewPortHandler.contentBottom());
// draw a path because lines don't support dashing on lower android versions
c.drawPath(zeroLinePath, mZeroLinePaint);
c.restoreToCount(clipRestoreCount);
}
代码示例来源:origin: PhilJay/MPAndroidChart
/**
* Draws the zero line.
*/
protected void drawZeroLine(Canvas c) {
int clipRestoreCount = c.save();
mZeroLineClippingRect.set(mViewPortHandler.getContentRect());
mZeroLineClippingRect.inset(0.f, -mYAxis.getZeroLineWidth());
c.clipRect(mZeroLineClippingRect);
// draw zero line
MPPointD pos = mTrans.getPixelForValues(0f, 0f);
mZeroLinePaint.setColor(mYAxis.getZeroLineColor());
mZeroLinePaint.setStrokeWidth(mYAxis.getZeroLineWidth());
Path zeroLinePath = mDrawZeroLinePath;
zeroLinePath.reset();
zeroLinePath.moveTo(mViewPortHandler.contentLeft(), (float) pos.y);
zeroLinePath.lineTo(mViewPortHandler.contentRight(), (float) pos.y);
// draw a path because lines don't support dashing on lower android versions
c.drawPath(zeroLinePath, mZeroLinePaint);
c.restoreToCount(clipRestoreCount);
}
代码示例来源:origin: WenWangAndroid/ChartManager
@Override
protected void drawZeroLine(Canvas c) {
int clipRestoreCount = c.save();
mZeroLineClippingRect.set(mViewPortHandler.getContentRect());
mZeroLineClippingRect.inset(-mYAxis.getZeroLineWidth(), 0.f);
c.clipRect(mLimitLineClippingRect);
// draw zero line
MPPointD pos = mTrans.getPixelForValues(0f, 0f);
mZeroLinePaint.setColor(mYAxis.getZeroLineColor());
mZeroLinePaint.setStrokeWidth(mYAxis.getZeroLineWidth());
Path zeroLinePath = mDrawZeroLinePathBuffer;
zeroLinePath.reset();
zeroLinePath.moveTo((float) pos.x - 1, mViewPortHandler.contentTop());
zeroLinePath.lineTo((float) pos.x - 1, mViewPortHandler.contentBottom());
// draw a path because lines don't support dashing on lower android versions
c.drawPath(zeroLinePath, mZeroLinePaint);
c.restoreToCount(clipRestoreCount);
}
代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart
@Override
protected void drawZeroLine(Canvas c) {
int clipRestoreCount = c.save();
mZeroLineClippingRect.set(mViewPortHandler.getContentRect());
mZeroLineClippingRect.inset(-mYAxis.getZeroLineWidth(), 0.f);
c.clipRect(mLimitLineClippingRect);
// draw zero line
MPPointD pos = mTrans.getPixelForValues(0f, 0f);
mZeroLinePaint.setColor(mYAxis.getZeroLineColor());
mZeroLinePaint.setStrokeWidth(mYAxis.getZeroLineWidth());
Path zeroLinePath = mDrawZeroLinePathBuffer;
zeroLinePath.reset();
zeroLinePath.moveTo((float) pos.x - 1, mViewPortHandler.contentTop());
zeroLinePath.lineTo((float) pos.x - 1, mViewPortHandler.contentBottom());
// draw a path because lines don't support dashing on lower android versions
c.drawPath(zeroLinePath, mZeroLinePaint);
c.restoreToCount(clipRestoreCount);
}
代码示例来源:origin: com.github.PhilJay/MPAndroidChart
@Override
protected void drawZeroLine(Canvas c) {
int clipRestoreCount = c.save();
mZeroLineClippingRect.set(mViewPortHandler.getContentRect());
mZeroLineClippingRect.inset(-mYAxis.getZeroLineWidth(), 0.f);
c.clipRect(mLimitLineClippingRect);
// draw zero line
MPPointD pos = mTrans.getPixelForValues(0f, 0f);
mZeroLinePaint.setColor(mYAxis.getZeroLineColor());
mZeroLinePaint.setStrokeWidth(mYAxis.getZeroLineWidth());
Path zeroLinePath = mDrawZeroLinePathBuffer;
zeroLinePath.reset();
zeroLinePath.moveTo((float) pos.x - 1, mViewPortHandler.contentTop());
zeroLinePath.lineTo((float) pos.x - 1, mViewPortHandler.contentBottom());
// draw a path because lines don't support dashing on lower android versions
c.drawPath(zeroLinePath, mZeroLinePaint);
c.restoreToCount(clipRestoreCount);
}
代码示例来源:origin: xiaolongonly/Ticket-Analysis
@Override
protected void drawZeroLine(Canvas c) {
int clipRestoreCount = c.save();
mZeroLineClippingRect.set(mViewPortHandler.getContentRect());
mZeroLineClippingRect.inset(-mYAxis.getZeroLineWidth(), 0.f);
c.clipRect(mLimitLineClippingRect);
// draw zero line
MPPointD pos = mTrans.getPixelForValues(0f, 0f);
mZeroLinePaint.setColor(mYAxis.getZeroLineColor());
mZeroLinePaint.setStrokeWidth(mYAxis.getZeroLineWidth());
Path zeroLinePath = mDrawZeroLinePathBuffer;
zeroLinePath.reset();
zeroLinePath.moveTo((float) pos.x - 1, mViewPortHandler.contentTop());
zeroLinePath.lineTo((float) pos.x - 1, mViewPortHandler.contentBottom());
// draw a path because lines don't support dashing on lower android versions
c.drawPath(zeroLinePath, mZeroLinePaint);
c.restoreToCount(clipRestoreCount);
}
代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart
/**
* Draws the zero line.
*/
protected void drawZeroLine(Canvas c) {
int clipRestoreCount = c.save();
mZeroLineClippingRect.set(mViewPortHandler.getContentRect());
mZeroLineClippingRect.inset(0.f, -mYAxis.getZeroLineWidth());
c.clipRect(mZeroLineClippingRect);
// draw zero line
MPPointD pos = mTrans.getPixelForValues(0f, 0f);
mZeroLinePaint.setColor(mYAxis.getZeroLineColor());
mZeroLinePaint.setStrokeWidth(mYAxis.getZeroLineWidth());
Path zeroLinePath = mDrawZeroLinePath;
zeroLinePath.reset();
zeroLinePath.moveTo(mViewPortHandler.contentLeft(), (float) pos.y);
zeroLinePath.lineTo(mViewPortHandler.contentRight(), (float) pos.y);
// draw a path because lines don't support dashing on lower android versions
c.drawPath(zeroLinePath, mZeroLinePaint);
c.restoreToCount(clipRestoreCount);
}
代码示例来源:origin: WenWangAndroid/ChartManager
/**
* Draws the zero line.
*/
protected void drawZeroLine(Canvas c) {
int clipRestoreCount = c.save();
mZeroLineClippingRect.set(mViewPortHandler.getContentRect());
mZeroLineClippingRect.inset(0.f, -mYAxis.getZeroLineWidth());
c.clipRect(mZeroLineClippingRect);
// draw zero line
MPPointD pos = mTrans.getPixelForValues(0f, 0f);
mZeroLinePaint.setColor(mYAxis.getZeroLineColor());
mZeroLinePaint.setStrokeWidth(mYAxis.getZeroLineWidth());
Path zeroLinePath = mDrawZeroLinePath;
zeroLinePath.reset();
zeroLinePath.moveTo(mViewPortHandler.contentLeft(), (float) pos.y);
zeroLinePath.lineTo(mViewPortHandler.contentRight(), (float) pos.y);
// draw a path because lines don't support dashing on lower android versions
c.drawPath(zeroLinePath, mZeroLinePaint);
c.restoreToCount(clipRestoreCount);
}
代码示例来源:origin: com.github.PhilJay/MPAndroidChart
/**
* Draws the zero line.
*/
protected void drawZeroLine(Canvas c) {
int clipRestoreCount = c.save();
mZeroLineClippingRect.set(mViewPortHandler.getContentRect());
mZeroLineClippingRect.inset(0.f, -mYAxis.getZeroLineWidth());
c.clipRect(mZeroLineClippingRect);
// draw zero line
MPPointD pos = mTrans.getPixelForValues(0f, 0f);
mZeroLinePaint.setColor(mYAxis.getZeroLineColor());
mZeroLinePaint.setStrokeWidth(mYAxis.getZeroLineWidth());
Path zeroLinePath = mDrawZeroLinePath;
zeroLinePath.reset();
zeroLinePath.moveTo(mViewPortHandler.contentLeft(), (float) pos.y);
zeroLinePath.lineTo(mViewPortHandler.contentRight(), (float) pos.y);
// draw a path because lines don't support dashing on lower android versions
c.drawPath(zeroLinePath, mZeroLinePaint);
c.restoreToCount(clipRestoreCount);
}
代码示例来源:origin: xiaolongonly/Ticket-Analysis
/**
* Draws the zero line.
*/
protected void drawZeroLine(Canvas c) {
int clipRestoreCount = c.save();
mZeroLineClippingRect.set(mViewPortHandler.getContentRect());
mZeroLineClippingRect.inset(0.f, -mYAxis.getZeroLineWidth());
c.clipRect(mZeroLineClippingRect);
// draw zero line
MPPointD pos = mTrans.getPixelForValues(0f, 0f);
mZeroLinePaint.setColor(mYAxis.getZeroLineColor());
mZeroLinePaint.setStrokeWidth(mYAxis.getZeroLineWidth());
Path zeroLinePath = mDrawZeroLinePath;
zeroLinePath.reset();
zeroLinePath.moveTo(mViewPortHandler.contentLeft(), (float) pos.y);
zeroLinePath.lineTo(mViewPortHandler.contentRight(), (float) pos.y);
// draw a path because lines don't support dashing on lower android versions
c.drawPath(zeroLinePath, mZeroLinePaint);
c.restoreToCount(clipRestoreCount);
}
内容来源于网络,如有侵权,请联系作者删除!