invalidate();
}
+void ePositionGauge::setPointer(int which, ePtr<gPixmap> &pixmap, const ePoint ¢er)
+{
+ setPointer(which, pixmap.operator->(), center);
+}
+
void ePositionGauge::setPointer(int which, gPixmap *pixmap, const ePoint ¢er)
{
if (which == 0)
updatePosition();
}
-void ePositionGauge::setInOutList(PyObject *list)
+void ePositionGauge::setInOutList(ePyObject list)
{
if (!PyList_Check(list))
return;
for (i=0; i<size; ++i)
{
- PyObject *tuple = PyList_GetItem(list, i);
+ ePyObject tuple = PyList_GET_ITEM(list, i);
if (!PyTuple_Check(tuple))
continue;
if (PyTuple_Size(tuple) != 2)
continue;
- PyObject *ppts = PyTuple_GetItem(tuple, 0), *ptype = PyTuple_GetItem(tuple, 1);
+ ePyObject ppts = PyTuple_GET_ITEM(tuple, 0), ptype = PyTuple_GET_ITEM(tuple, 1);
if (!(PyLong_Check(ppts) && PyInt_Check(ptype)))
continue;
// painter.fill(eRect(0, 10, s.width(), s.height()-20));
pts_t in = 0, out = 0;
+ int xm, xm_last = -1;
std::multiset<cueEntry>::iterator i(m_cue_entries.begin());
continue;
} else if (i->what == 1) /* out */
out = i++->where;
- else /* mark */
+ else /* mark or last */
{
- int xm = scale(i->where);
- painter.setForegroundColor(gRGB(0xFF8080));
- painter.fill(eRect(xm - 2, 0, 4, s.height()));
+ xm = scale(i->where);
+ if (i->what == 2) {
+ painter.setForegroundColor(gRGB(0xFF8080));
+ if (xm - 2 < xm_last) /* Make sure last is not overdrawn */
+ painter.fill(eRect(xm_last, 0, 2 + xm - xm_last, s.height()));
+ else
+ painter.fill(eRect(xm - 2, 0, 4, s.height()));
+ } else if (i->what == 3) {
+ painter.setForegroundColor(gRGB(0x80FF80));
+ painter.fill(eRect(xm - 1, 0, 3, s.height()));
+ xm_last = xm + 2;
+ }
i++;
continue;
}
{
painter.setForegroundColor(gRGB(m_foreground_color));
int xi = scale(in), xo = scale(out);
- painter.fill(eRect(xi, 10, xo-xi, s.height()-14));
+ painter.fill(eRect(xi, (s.height()-4) / 2, xo-xi, 4));
}
in = m_length;