Minor update to trace widget

master
Timothy Pearson 10 years ago
parent 9ab208e78c
commit c223a6a35f

@ -44,6 +44,7 @@
#define CURSOR_DARKNESS_FACTOR 200
#define ZOOM_SHADING_DARKNESS_FACTOR 200
#define DIGITAL_SHADING_DARKNESS_FACTOR 400
#define CURSOR_MOVE_CAPTURE_DISTANCE 0
@ -548,6 +549,7 @@ TraceData::TraceData(TraceWidget* parent, TQWidget* labelParent) : TQObject(), p
horizontalUnits = i18n("Units");
verticalUnits = i18n("Units");
m_digitalTraceDrawing = false;
m_digitalShaderDarkness = DIGITAL_SHADING_DARKNESS_FACTOR;
m_suppressNameInCursorText = false;
enabled = false;
@ -718,23 +720,23 @@ void TraceData::drawTrace(TQPainter* p, int graticule_width, int graticule_heigh
// Draw fill areas
if ((sampleArray[n] != 0) && (sampleArray[n+1] != 0)) {
p->save();
p->fillRect(x+1, y+1, x2-x, baseline-y, TQBrush(color.dark(400)));
p->fillRect(x+1, y+1, x2-x, baseline-y, TQBrush(color.dark(m_digitalShaderDarkness)));
p->restore();
}
else if ((sampleArray[n] != 0) && (sampleArray[n+1] == 0)) {
p->save();
// Fill sloping edges
p->setPen(color.dark(400));
p->setPen(color.dark(m_digitalShaderDarkness));
p->drawLine(x2-3, y+1, x2-1, y2-1);
p->drawLine(x2-2, y+1, x2, y2-1);
// Fill rectangle under trace
p->fillRect(x+2, y+1, (x2-1)-(x+1)-1, baseline-y, TQBrush(color.dark(400)));
p->fillRect(x+2, y+1, (x2-1)-(x+1)-1, baseline-y, TQBrush(color.dark(m_digitalShaderDarkness)));
p->restore();
}
else if ((sampleArray[n] == 0) && (sampleArray[n+1] != 0)) {
p->save();
// Fill sloping edges
p->setPen(color.dark(400));
p->setPen(color.dark(m_digitalShaderDarkness));
p->drawLine(x2+1, y+1, x2+3, y2-1);
p->drawLine(x2, y+1, x2+2, y2-1);
p->restore();

@ -123,6 +123,7 @@ class TraceData : public TQObject
TQString horizontalUnits;
TQString verticalUnits;
bool m_digitalTraceDrawing;
unsigned int m_digitalShaderDarkness;
bool m_suppressNameInCursorText;
TQLabel* paramLabel;
TQLabel* leftLabel;

Loading…
Cancel
Save