comparison layer/TimeValueLayer.cpp @ 554:ffeafe09c8d9

* Add origin line (y=0) to time-value layer
author Chris Cannam
date Fri, 29 Jan 2010 13:54:25 +0000
parents 97e60a895211
children 5bcfc5606528
comparison
equal deleted inserted replaced
553:97e60a895211 554:ffeafe09c8d9
903 int pointCount = 0; 903 int pointCount = 0;
904 904
905 int textY = 0; 905 int textY = 0;
906 if (m_plotStyle == PlotSegmentation) { 906 if (m_plotStyle == PlotSegmentation) {
907 textY = v->getTextLabelHeight(this, paint); 907 textY = v->getTextLabelHeight(this, paint);
908 } else {
909 int originY = getYForValue(v, 0.f);
910 if (originY > 0 && originY < v->height()) {
911 paint.save();
912 paint.setPen(getPartialShades(v)[1]);
913 paint.drawLine(x0, originY, x1, originY);
914 paint.restore();
915 }
908 } 916 }
909 917
910 for (SparseTimeValueModel::PointList::const_iterator i = points.begin(); 918 for (SparseTimeValueModel::PointList::const_iterator i = points.begin();
911 i != points.end(); ++i) { 919 i != points.end(); ++i) {
912 920