mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
remove naive attempt to avoid drawing first vertical pixel line of Canvas::WaveView
And add commented out attempt at more subtle attempt to get it right
This commit is contained in:
parent
11cfdd4c6d
commit
0f0aebf26b
1 changed files with 13 additions and 3 deletions
|
|
@ -805,7 +805,7 @@ WaveView::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) cons
|
||||||
* draw "between" pixels at the start and/or end.
|
* draw "between" pixels at the start and/or end.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const double draw_start = floor (draw.x0) + _start_shift;
|
double draw_start = floor (draw.x0);
|
||||||
const double draw_end = floor (draw.x1);
|
const double draw_end = floor (draw.x1);
|
||||||
|
|
||||||
// cerr << "Need to draw " << draw_start << " .. " << draw_end << endl;
|
// cerr << "Need to draw " << draw_start << " .. " << draw_end << endl;
|
||||||
|
|
@ -834,6 +834,16 @@ WaveView::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) cons
|
||||||
|
|
||||||
// cerr << "Offset into image to place at zero: " << image_offset << endl;
|
// cerr << "Offset into image to place at zero: " << image_offset << endl;
|
||||||
|
|
||||||
|
if (_start_shift && (sample_start == _region_start) && (self.x0 == draw.x0)) {
|
||||||
|
/* we are going to draw the first pixel for this region, but
|
||||||
|
we may not want this to overlap a border around the
|
||||||
|
waveform. If so, _start_shift will be set.
|
||||||
|
*/
|
||||||
|
//cerr << name.substr (23) << " ss = " << sample_start << " rs = " << _region_start << " sf = " << _start_shift << " ds = " << draw_start << " self = " << self << " draw = " << draw << endl;
|
||||||
|
//draw_start += _start_shift;
|
||||||
|
//image_offset += _start_shift;
|
||||||
|
}
|
||||||
|
|
||||||
context->rectangle (draw_start, draw.y0, draw_end - draw_start, draw.height());
|
context->rectangle (draw_start, draw.y0, draw_end - draw_start, draw.height());
|
||||||
|
|
||||||
/* round image origin position to an exact pixel in device space to
|
/* round image origin position to an exact pixel in device space to
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue