projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ecfd2a7
)
change all frame_to_pixel and pixel_to_frame to sample_to_pixel and pixel_to_sample
author
Paul Davis
<paul@linuxaudiosystems.com>
Fri, 12 Apr 2013 15:15:45 +0000
(11:15 -0400)
committer
Paul Davis
<paul@linuxaudiosystems.com>
Fri, 12 Apr 2013 15:15:45 +0000
(11:15 -0400)
28 files changed:
gtk2_ardour/audio_region_view.cc
patch
|
blob
|
history
gtk2_ardour/audio_streamview.cc
patch
|
blob
|
history
gtk2_ardour/automation_line.cc
patch
|
blob
|
history
gtk2_ardour/automation_region_view.cc
patch
|
blob
|
history
gtk2_ardour/editor.cc
patch
|
blob
|
history
gtk2_ardour/editor.h
patch
|
blob
|
history
gtk2_ardour/editor_canvas.cc
patch
|
blob
|
history
gtk2_ardour/editor_cursors.cc
patch
|
blob
|
history
gtk2_ardour/editor_drag.cc
patch
|
blob
|
history
gtk2_ardour/editor_imageframe.cc
patch
|
blob
|
history
gtk2_ardour/editor_markers.cc
patch
|
blob
|
history
gtk2_ardour/editor_mouse.cc
patch
|
blob
|
history
gtk2_ardour/editor_rulers.cc
patch
|
blob
|
history
gtk2_ardour/editor_summary.cc
patch
|
blob
|
history
gtk2_ardour/editor_videotimeline.cc
patch
|
blob
|
history
gtk2_ardour/imageframe_view.cc
patch
|
blob
|
history
gtk2_ardour/marker.cc
patch
|
blob
|
history
gtk2_ardour/midi_region_view.cc
patch
|
blob
|
history
gtk2_ardour/midi_region_view.h
patch
|
blob
|
history
gtk2_ardour/midi_streamview.cc
patch
|
blob
|
history
gtk2_ardour/public_editor.h
patch
|
blob
|
history
gtk2_ardour/region_view.cc
patch
|
blob
|
history
gtk2_ardour/streamview.cc
patch
|
blob
|
history
gtk2_ardour/time_axis_view.cc
patch
|
blob
|
history
gtk2_ardour/time_axis_view_item.cc
patch
|
blob
|
history
gtk2_ardour/video_image_frame.cc
patch
|
blob
|
history
gtk2_ardour/video_timeline.cc
patch
|
blob
|
history
libs/canvas/rectangle.cc
patch
|
blob
|
history
diff --git
a/gtk2_ardour/audio_region_view.cc
b/gtk2_ardour/audio_region_view.cc
index cf348bf532b3e2984e1fca07f7d2f13923fef561..4926d48d13d376376c09fdab4efe37c6838c9060 100644
(file)
--- a/
gtk2_ardour/audio_region_view.cc
+++ b/
gtk2_ardour/audio_region_view.cc
@@
-420,7
+420,7
@@
AudioRegionView::reset_width_dependent_items (double pixel_width)
for (i = analysis_features.begin(), l = feature_lines.begin(); i != analysis_features.end() && l != feature_lines.end(); ++i, ++l) {
for (i = analysis_features.begin(), l = feature_lines.begin(); i != analysis_features.end() && l != feature_lines.end(); ++i, ++l) {
- float x_pos = trackview.editor().
fram
e_to_pixel (*i);
+ float x_pos = trackview.editor().
sampl
e_to_pixel (*i);
(*l).second->set (ArdourCanvas::Duple (x_pos, 2.0),
ArdourCanvas::Duple (x_pos, _height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 1));
(*l).second->set (ArdourCanvas::Duple (x_pos, 2.0),
ArdourCanvas::Duple (x_pos, _height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 1));
@@
-505,7
+505,7
@@
AudioRegionView::set_height (gdouble height)
for (l = feature_lines.begin(); l != feature_lines.end(); ++l) {
for (l = feature_lines.begin(); l != feature_lines.end(); ++l) {
- float pos_x = trackview.editor().
fram
e_to_pixel((*l).first);
+ float pos_x = trackview.editor().
sampl
e_to_pixel((*l).first);
(*l).second->set (ArdourCanvas::Duple (pos_x, 2.0),
ArdourCanvas::Duple (pos_x, _height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 1));
(*l).second->set (ArdourCanvas::Duple (pos_x, 2.0),
ArdourCanvas::Duple (pos_x, _height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 1));
@@
-980,7
+980,7
@@
AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
item->canvas_to_item (x, y);
item->canvas_to_item (x, y);
- framepos_t fx = trackview.editor().pixel_to_
fram
e (x);
+ framepos_t fx = trackview.editor().pixel_to_
sampl
e (x);
if (fx > _region->length()) {
return;
if (fx > _region->length()) {
return;
@@
-1281,7
+1281,7
@@
AudioRegionView::transients_changed ()
for (i = analysis_features.begin(), l = feature_lines.begin(); i != analysis_features.end() && l != feature_lines.end(); ++i, ++l) {
float *pos = new float;
for (i = analysis_features.begin(), l = feature_lines.begin(); i != analysis_features.end() && l != feature_lines.end(); ++i, ++l) {
float *pos = new float;
- *pos = trackview.editor().
fram
e_to_pixel (*i);
+ *pos = trackview.editor().
sampl
e_to_pixel (*i);
(*l).second->set (
ArdourCanvas::Duple (*pos, 2.0),
(*l).second->set (
ArdourCanvas::Duple (*pos, 2.0),
@@
-1308,7
+1308,7
@@
AudioRegionView::update_transient(float /*old_pos*/, float new_pos)
if (rint(new_pos) == rint(*pos)) {
framepos_t old_frame = (*l).first;
if (rint(new_pos) == rint(*pos)) {
framepos_t old_frame = (*l).first;
- framepos_t new_frame = trackview.editor().pixel_to_
fram
e (new_pos);
+ framepos_t new_frame = trackview.editor().pixel_to_
sampl
e (new_pos);
_region->update_transient (old_frame, new_frame);
_region->update_transient (old_frame, new_frame);
@@
-1360,7
+1360,7
@@
AudioRegionView::redraw_start_xfade ()
void
AudioRegionView::redraw_start_xfade_to (boost::shared_ptr<AudioRegion> ar, framecnt_t len)
{
void
AudioRegionView::redraw_start_xfade_to (boost::shared_ptr<AudioRegion> ar, framecnt_t len)
{
- int32_t const npoints = trackview.editor().
fram
e_to_pixel (len);
+ int32_t const npoints = trackview.editor().
sampl
e_to_pixel (len);
if (npoints < 3) {
return;
if (npoints < 3) {
return;
@@
-1468,7
+1468,7
@@
AudioRegionView::redraw_end_xfade ()
void
AudioRegionView::redraw_end_xfade_to (boost::shared_ptr<AudioRegion> ar, framecnt_t len)
{
void
AudioRegionView::redraw_end_xfade_to (boost::shared_ptr<AudioRegion> ar, framecnt_t len)
{
- int32_t const npoints = trackview.editor().
fram
e_to_pixel (len);
+ int32_t const npoints = trackview.editor().
sampl
e_to_pixel (len);
if (npoints < 3) {
return;
if (npoints < 3) {
return;
@@
-1505,7
+1505,7
@@
AudioRegionView::redraw_end_xfade_to (boost::shared_ptr<AudioRegion> ar, framecn
ar->fade_out()->curve().get_vector (0, ar->fade_out()->back()->when, vec.get(), npoints);
ar->fade_out()->curve().get_vector (0, ar->fade_out()->back()->when, vec.get(), npoints);
- double rend = trackview.editor().
fram
e_to_pixel (_region->length() - len);
+ double rend = trackview.editor().
sampl
e_to_pixel (_region->length() - len);
double effective_height;
if (_height >= NAME_HIGHLIGHT_THRESH) {
double effective_height;
if (_height >= NAME_HIGHLIGHT_THRESH) {
diff --git
a/gtk2_ardour/audio_streamview.cc
b/gtk2_ardour/audio_streamview.cc
index fee25569f850d22dd9aed0e74bdf6e918af46a83..5946314bda66a5531115f76d3a0138b0ac63b5e5 100644
(file)
--- a/
gtk2_ardour/audio_streamview.cc
+++ b/
gtk2_ardour/audio_streamview.cc
@@
-263,7
+263,7
@@
AudioStreamView::setup_rec_box ()
at = _trackview.audio_track(); /* we know what it is already */
framepos_t const frame_pos = at->current_capture_start ();
at = _trackview.audio_track(); /* we know what it is already */
framepos_t const frame_pos = at->current_capture_start ();
- gdouble xstart = _trackview.editor().
fram
e_to_pixel (frame_pos);
+ gdouble xstart = _trackview.editor().
sampl
e_to_pixel (frame_pos);
gdouble xend;
uint32_t fill_color;
gdouble xend;
uint32_t fill_color;
@@
-435,7
+435,7
@@
AudioStreamView::update_rec_regions (framepos_t start, framecnt_t cnt)
/* also update rect */
ArdourCanvas::Rectangle * rect = rec_rects[n].rectangle;
/* also update rect */
ArdourCanvas::Rectangle * rect = rec_rects[n].rectangle;
- gdouble xend = _trackview.editor().
fram
e_to_pixel (region->position() + region->length());
+ gdouble xend = _trackview.editor().
sampl
e_to_pixel (region->position() + region->length());
rect->set_x1 (xend);
}
rect->set_x1 (xend);
}
diff --git
a/gtk2_ardour/automation_line.cc
b/gtk2_ardour/automation_line.cc
index 72098fd7c88faed9f9fae3b63af58fb3e5f00da6..75e20e2329fc4d2c5e08b2bec0a9f6da6c25c07e 100644
(file)
--- a/
gtk2_ardour/automation_line.cc
+++ b/
gtk2_ardour/automation_line.cc
@@
-243,7
+243,7
@@
AutomationLine::modify_point_y (ControlPoint& cp, double y)
y = min (1.0, y);
y = _height - (y * _height);
y = min (1.0, y);
y = _height - (y * _height);
- double const x = trackview.editor().
fram
e_to_pixel_unrounded (_time_converter->to((*cp.model())->when) - _offset);
+ double const x = trackview.editor().
sampl
e_to_pixel_unrounded (_time_converter->to((*cp.model())->when) - _offset);
trackview.editor().session()->begin_reversible_command (_("automation event move"));
trackview.editor().session()->add_command (
trackview.editor().session()->begin_reversible_command (_("automation event move"));
trackview.editor().session()->add_command (
@@
-739,10
+739,10
@@
AutomationLine::sync_model_with_view_point (ControlPoint& cp)
/* if xval has not changed, set it directly from the model to avoid rounding errors */
/* if xval has not changed, set it directly from the model to avoid rounding errors */
- if (view_x == trackview.editor().
fram
e_to_pixel_unrounded (_time_converter->to ((*cp.model())->when)) - _offset) {
+ if (view_x == trackview.editor().
sampl
e_to_pixel_unrounded (_time_converter->to ((*cp.model())->when)) - _offset) {
view_x = (*cp.model())->when - _offset;
} else {
view_x = (*cp.model())->when - _offset;
} else {
- view_x = trackview.editor().pixel_to_
fram
e (view_x);
+ view_x = trackview.editor().pixel_to_
sampl
e (view_x);
view_x = _time_converter->from (view_x + _offset);
}
view_x = _time_converter->from (view_x + _offset);
}
@@
-760,7
+760,7
@@
AutomationLine::control_points_adjacent (double xval, uint32_t & before, uint32_
ControlPoint *acp = 0;
double unit_xval;
ControlPoint *acp = 0;
double unit_xval;
- unit_xval = trackview.editor().
fram
e_to_pixel_unrounded (xval);
+ unit_xval = trackview.editor().
sampl
e_to_pixel_unrounded (xval);
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
@@
-947,7
+947,7
@@
AutomationLine::reset_callback (const Evoral::ControlList& events)
* zoom and scroll into account).
*/
* zoom and scroll into account).
*/
- tx = trackview.editor().
fram
e_to_pixel_unrounded (tx);
+ tx = trackview.editor().
sampl
e_to_pixel_unrounded (tx);
/* convert from canonical view height (0..1.0) to actual
* height coordinates (using X11's top-left rooted system)
/* convert from canonical view height (0..1.0) to actual
* height coordinates (using X11's top-left rooted system)
diff --git
a/gtk2_ardour/automation_region_view.cc
b/gtk2_ardour/automation_region_view.cc
index f48fec43b95ed0a8a61276560ee97598398f5453..ae8c337de60dd14010afc4130571357b807a6576 100644
(file)
--- a/
gtk2_ardour/automation_region_view.cc
+++ b/
gtk2_ardour/automation_region_view.cc
@@
-120,7
+120,7
@@
AutomationRegionView::canvas_event (GdkEvent* ev)
y = std::max (y, 0.0);
y = std::min (y, _height - NAME_HIGHLIGHT_SIZE);
y = std::max (y, 0.0);
y = std::min (y, _height - NAME_HIGHLIGHT_SIZE);
- add_automation_event (ev, trackview.editor().pixel_to_
fram
e (x) - _region->position() + _region->start(), y);
+ add_automation_event (ev, trackview.editor().pixel_to_
sampl
e (x) - _region->position() + _region->start(), y);
}
return false;
}
return false;
diff --git
a/gtk2_ardour/editor.cc
b/gtk2_ardour/editor.cc
index f72e33bf4654bf6cb27c4381386767944e55248a..fa589c914d71900772c4a74c4562e37f0b6f09f3 100644
(file)
--- a/
gtk2_ardour/editor.cc
+++ b/
gtk2_ardour/editor.cc
@@
-2833,12
+2833,12
@@
Editor::snap_to_internal (framepos_t& start, int32_t direction, bool for_mark)
case SnapMagnetic:
if (presnap > start) {
case SnapMagnetic:
if (presnap > start) {
- if (presnap > (start + pixel_to_
fram
e(snap_threshold))) {
+ if (presnap > (start + pixel_to_
sampl
e(snap_threshold))) {
start = presnap;
}
} else if (presnap < start) {
start = presnap;
}
} else if (presnap < start) {
- if (presnap < (start - pixel_to_
fram
e(snap_threshold))) {
+ if (presnap < (start - pixel_to_
sampl
e(snap_threshold))) {
start = presnap;
}
}
start = presnap;
}
}
diff --git
a/gtk2_ardour/editor.h
b/gtk2_ardour/editor.h
index 897ea0afee249e4c44e1f99113409a91c39ea0d6..8cea1e10f8f9d3645fbfc2bd00fb5a80e0c156b4 100644
(file)
--- a/
gtk2_ardour/editor.h
+++ b/
gtk2_ardour/editor.h
@@
-227,7
+227,7
@@
class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
xscroll_adjustment.
*/
xscroll_adjustment.
*/
- framepos_t pixel_to_
fram
e (double pixel) const {
+ framepos_t pixel_to_
sampl
e (double pixel) const {
/* pixel can be less than zero when motion events
are processed. since we've already run the world->canvas
/* pixel can be less than zero when motion events
are processed. since we've already run the world->canvas
@@
-242,11
+242,11
@@
class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
}
}
}
}
- double
fram
e_to_pixel (framepos_t frame) const {
+ double
sampl
e_to_pixel (framepos_t frame) const {
return rint (frame / frames_per_pixel);
}
return rint (frame / frames_per_pixel);
}
- double
fram
e_to_pixel_unrounded (framepos_t frame) const {
+ double
sampl
e_to_pixel_unrounded (framepos_t frame) const {
return frame / frames_per_pixel;
}
return frame / frames_per_pixel;
}
diff --git
a/gtk2_ardour/editor_canvas.cc
b/gtk2_ardour/editor_canvas.cc
index 5b5ae3e0dec5705b0e30063f0c836494174c98e4..da6749c3f8c5b9b5066af10444d5f90209897c93 100644
(file)
--- a/
gtk2_ardour/editor_canvas.cc
+++ b/
gtk2_ardour/editor_canvas.cc
@@
-493,9
+493,9
@@
Editor::maybe_autoscroll (bool allow_horiz, bool allow_vert, bool moving_left, b
Gtk::Allocation editor_list = _the_notebook.get_allocation ();
Gtk::Allocation editor_list = _the_notebook.get_allocation ();
- framecnt_t distance = pixel_to_
fram
e (root_rect.get_x() + root_rect.get_width() - window_rect.get_x() - window_rect.get_width());
+ framecnt_t distance = pixel_to_
sampl
e (root_rect.get_x() + root_rect.get_width() - window_rect.get_x() - window_rect.get_width());
if (_the_notebook.is_visible ()) {
if (_the_notebook.is_visible ()) {
- distance += pixel_to_
fram
e (editor_list.get_width());
+ distance += pixel_to_
sampl
e (editor_list.get_width());
}
/* Note whether we're fudging the autoscroll (see autoscroll_fudge_threshold) */
}
/* Note whether we're fudging the autoscroll (see autoscroll_fudge_threshold) */
@@
-912,7
+912,7
@@
Editor::update_canvas_now ()
double
Editor::horizontal_position () const
{
double
Editor::horizontal_position () const
{
- return
fram
e_to_pixel (leftmost_frame);
+ return
sampl
e_to_pixel (leftmost_frame);
}
void
}
void
diff --git
a/gtk2_ardour/editor_cursors.cc
b/gtk2_ardour/editor_cursors.cc
index 81fba54b78cf89567089fb0cb803191dc98a78bd..c5e6b6d5d6d251b3e37d8880a5bd48bb31babd07 100644
(file)
--- a/
gtk2_ardour/editor_cursors.cc
+++ b/
gtk2_ardour/editor_cursors.cc
@@
-67,7
+67,7
@@
EditorCursor::set_position (framepos_t frame)
{
PositionChanged (frame);
{
PositionChanged (frame);
- double const new_pos = _editor.
fram
e_to_pixel (frame);
+ double const new_pos = _editor.
sampl
e_to_pixel (frame);
if (new_pos != _time_bars_canvas_item.x ()) {
_time_bars_canvas_item.set_x (new_pos);
if (new_pos != _time_bars_canvas_item.x ()) {
_time_bars_canvas_item.set_x (new_pos);
diff --git
a/gtk2_ardour/editor_drag.cc
b/gtk2_ardour/editor_drag.cc
index 270f5f7d31d8f912f37aaef2c2d3920cc731a50c..2074e13c501f512b41a15a3736c1e42abb2a03fd 100644
(file)
--- a/
gtk2_ardour/editor_drag.cc
+++ b/
gtk2_ardour/editor_drag.cc
@@
-1896,7
+1896,7
@@
TrimDrag::motion (GdkEvent* event, bool first_move)
boost::shared_ptr<AudioRegion> ar (arv->audio_region());
distance = _drags->current_pointer_x() - grab_x();
len = ar->fade_in()->back()->when;
boost::shared_ptr<AudioRegion> ar (arv->audio_region());
distance = _drags->current_pointer_x() - grab_x();
len = ar->fade_in()->back()->when;
- new_length = len - _editor->pixel_to_
fram
e (distance);
+ new_length = len - _editor->pixel_to_
sampl
e (distance);
new_length = ar->verify_xfade_bounds (new_length, true /*START*/ );
arv->reset_fade_in_shape_width (ar, new_length); //the grey shape
}
new_length = ar->verify_xfade_bounds (new_length, true /*START*/ );
arv->reset_fade_in_shape_width (ar, new_length); //the grey shape
}
@@
-1916,7
+1916,7
@@
TrimDrag::motion (GdkEvent* event, bool first_move)
boost::shared_ptr<AudioRegion> ar (arv->audio_region());
distance = grab_x() - _drags->current_pointer_x();
len = ar->fade_out()->back()->when;
boost::shared_ptr<AudioRegion> ar (arv->audio_region());
distance = grab_x() - _drags->current_pointer_x();
len = ar->fade_out()->back()->when;
- new_length = len - _editor->pixel_to_
fram
e (distance);
+ new_length = len - _editor->pixel_to_
sampl
e (distance);
new_length = ar->verify_xfade_bounds (new_length, false /*END*/ );
arv->reset_fade_out_shape_width (ar, new_length); //the grey shape
}
new_length = ar->verify_xfade_bounds (new_length, false /*END*/ );
arv->reset_fade_out_shape_width (ar, new_length); //the grey shape
}
@@
-1990,7
+1990,7
@@
TrimDrag::finished (GdkEvent* event, bool movement_occurred)
boost::shared_ptr<AudioRegion> ar (arv->audio_region());
distance = _drags->current_pointer_x() - grab_x();
len = ar->fade_in()->back()->when;
boost::shared_ptr<AudioRegion> ar (arv->audio_region());
distance = _drags->current_pointer_x() - grab_x();
len = ar->fade_in()->back()->when;
- new_length = len - _editor->pixel_to_
fram
e (distance);
+ new_length = len - _editor->pixel_to_
sampl
e (distance);
new_length = ar->verify_xfade_bounds (new_length, true /*START*/ );
ar->set_fade_in_length(new_length);
}
new_length = ar->verify_xfade_bounds (new_length, true /*START*/ );
ar->set_fade_in_length(new_length);
}
@@
-2007,7
+2007,7
@@
TrimDrag::finished (GdkEvent* event, bool movement_occurred)
boost::shared_ptr<AudioRegion> ar (arv->audio_region());
distance = _drags->current_pointer_x() - grab_x();
len = ar->fade_out()->back()->when;
boost::shared_ptr<AudioRegion> ar (arv->audio_region());
distance = _drags->current_pointer_x() - grab_x();
len = ar->fade_out()->back()->when;
- new_length = len - _editor->pixel_to_
fram
e (distance);
+ new_length = len - _editor->pixel_to_
sampl
e (distance);
new_length = ar->verify_xfade_bounds (new_length, false /*END*/ );
ar->set_fade_out_length(new_length);
}
new_length = ar->verify_xfade_bounds (new_length, false /*END*/ );
ar->set_fade_out_length(new_length);
}
@@
-3140,7
+3140,7
@@
ControlPointDrag::motion (GdkEvent* event, bool)
cy = max (0.0, cy);
cy = min ((double) _point->line().height(), cy);
cy = max (0.0, cy);
cy = min ((double) _point->line().height(), cy);
- framepos_t cx_frames = _editor->pixel_to_
fram
e (cx);
+ framepos_t cx_frames = _editor->pixel_to_
sampl
e (cx);
if (!_x_constrained) {
_editor->snap_to_with_modifier (cx_frames, event);
if (!_x_constrained) {
_editor->snap_to_with_modifier (cx_frames, event);
@@
-3150,7
+3150,7
@@
ControlPointDrag::motion (GdkEvent* event, bool)
float const fraction = 1.0 - (cy / _point->line().height());
float const fraction = 1.0 - (cy / _point->line().height());
- _point->line().drag_motion (_editor->
fram
e_to_pixel_unrounded (cx_frames), fraction, false, _pushing, _final_index);
+ _point->line().drag_motion (_editor->
sampl
e_to_pixel_unrounded (cx_frames), fraction, false, _pushing, _final_index);
_editor->verbose_cursor()->set_text (_point->line().get_verbose_cursor_string (fraction));
}
_editor->verbose_cursor()->set_text (_point->line().get_verbose_cursor_string (fraction));
}
@@
-3313,7
+3313,7
@@
FeatureLineDrag::start_grab (GdkEvent* event, Gdk::Cursor* /*cursor*/)
_arv = reinterpret_cast<AudioRegionView*> (_item->get_data ("regionview"));
_arv = reinterpret_cast<AudioRegionView*> (_item->get_data ("regionview"));
- _max_x = _editor->
fram
e_to_pixel(_arv->get_duration());
+ _max_x = _editor->
sampl
e_to_pixel(_arv->get_duration());
}
void
}
void
@@
-3409,8
+3409,8
@@
RubberbandSelectDrag::motion (GdkEvent* event, bool)
if (start != end || y1 != y2) {
if (start != end || y1 != y2) {
- double x1 = _editor->
fram
e_to_pixel (start);
- double x2 = _editor->
fram
e_to_pixel (end);
+ double x1 = _editor->
sampl
e_to_pixel (start);
+ double x2 = _editor->
sampl
e_to_pixel (end);
_editor->rubberband_rect->set_x0 (x1);
if (_vertical_only) {
_editor->rubberband_rect->set_x0 (x1);
if (_vertical_only) {
@@
-4045,8
+4045,8
@@
RangeMarkerBarDrag::motion (GdkEvent* event, bool first_move)
if (start != end) {
_editor->temp_location->set (start, end);
if (start != end) {
_editor->temp_location->set (start, end);
- double x1 = _editor->
fram
e_to_pixel (start);
- double x2 = _editor->
fram
e_to_pixel (end);
+ double x1 = _editor->
sampl
e_to_pixel (start);
+ double x2 = _editor->
sampl
e_to_pixel (end);
crect->set_x0 (x1);
crect->set_x1 (x2);
crect->set_x0 (x1);
crect->set_x1 (x2);
@@
-4146,8
+4146,8
@@
RangeMarkerBarDrag::aborted (bool)
void
RangeMarkerBarDrag::update_item (Location* location)
{
void
RangeMarkerBarDrag::update_item (Location* location)
{
- double const x1 = _editor->
fram
e_to_pixel (location->start());
- double const x2 = _editor->
fram
e_to_pixel (location->end());
+ double const x1 = _editor->
sampl
e_to_pixel (location->start());
+ double const x2 = _editor->
sampl
e_to_pixel (location->end());
_drag_rect->set_x0 (x1);
_drag_rect->set_x1 (x2);
_drag_rect->set_x0 (x1);
_drag_rect->set_x1 (x2);
@@
-4279,7
+4279,7
@@
frameoffset_t
NoteDrag::total_dx () const
{
/* dx in frames */
NoteDrag::total_dx () const
{
/* dx in frames */
- frameoffset_t const dx = _editor->pixel_to_
fram
e (_drags->current_pointer_x() - grab_x());
+ frameoffset_t const dx = _editor->pixel_to_
sampl
e (_drags->current_pointer_x() - grab_x());
/* primary note time */
frameoffset_t const n = _region->source_beats_to_absolute_frames (_primary->note()->time ());
/* primary note time */
frameoffset_t const n = _region->source_beats_to_absolute_frames (_primary->note()->time ());
@@
-4319,7
+4319,7
@@
NoteDrag::motion (GdkEvent *, bool)
int8_t const dy = total_dy ();
/* Now work out what we have to do to the note canvas items to set this new drag delta */
int8_t const dy = total_dy ();
/* Now work out what we have to do to the note canvas items to set this new drag delta */
- double const tdx = _editor->
fram
e_to_pixel (dx) - _cumulative_dx;
+ double const tdx = _editor->
sampl
e_to_pixel (dx) - _cumulative_dx;
double const tdy = -dy * _note_height - _cumulative_dy;
if (tdx || tdy) {
double const tdy = -dy * _note_height - _cumulative_dy;
if (tdx || tdy) {
@@
-4641,7
+4641,7
@@
PatchChangeDrag::motion (GdkEvent* ev, bool)
f = min (f, r->last_frame ());
framecnt_t const dxf = f - grab_frame(); // permitted dx in frames
f = min (f, r->last_frame ());
framecnt_t const dxf = f - grab_frame(); // permitted dx in frames
- double const dxu = _editor->
fram
e_to_pixel (dxf); // permitted fx in units
+ double const dxu = _editor->
sampl
e_to_pixel (dxf); // permitted fx in units
_patch_change->move (ArdourCanvas::Duple (dxu - _cumulative_dx, 0));
_cumulative_dx = dxu;
}
_patch_change->move (ArdourCanvas::Duple (dxu - _cumulative_dx, 0));
_cumulative_dx = dxu;
}
@@
-4696,8
+4696,8
@@
MidiRubberbandSelectDrag::select_things (int button_state, framepos_t x1, framep
y2 = max (0.0, y2 - y);
_region_view->update_drag_selection (
y2 = max (0.0, y2 - y);
_region_view->update_drag_selection (
- _editor->
fram
e_to_pixel (x1),
- _editor->
fram
e_to_pixel (x2),
+ _editor->
sampl
e_to_pixel (x1),
+ _editor->
sampl
e_to_pixel (x2),
y1,
y2,
Keyboard::modifier_state_contains (button_state, Keyboard::TertiaryModifier)
y1,
y2,
Keyboard::modifier_state_contains (button_state, Keyboard::TertiaryModifier)
@@
-4815,7
+4815,7
@@
NoteCreateDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
_note[0] = adjusted_frame (pf, event) - _region_view->region()->position ();
MidiStreamView* sv = _region_view->midi_stream_view ();
_note[0] = adjusted_frame (pf, event) - _region_view->region()->position ();
MidiStreamView* sv = _region_view->midi_stream_view ();
- double const x = _editor->
fram
e_to_pixel (_note[0]);
+ double const x = _editor->
sampl
e_to_pixel (_note[0]);
double const y = sv->note_to_y (sv->y_to_note (y_to_region (event->button.y)));
_drag_rect->set (ArdourCanvas::Rect (x, y, x, y + floor (_region_view->midi_stream_view()->note_height ())));
double const y = sv->note_to_y (sv->y_to_note (y_to_region (event->button.y)));
_drag_rect->set (ArdourCanvas::Rect (x, y, x, y + floor (_region_view->midi_stream_view()->note_height ())));
@@
-4828,7
+4828,7
@@
void
NoteCreateDrag::motion (GdkEvent* event, bool)
{
_note[1] = max ((framepos_t)0, adjusted_current_frame (event) - _region_view->region()->position ());
NoteCreateDrag::motion (GdkEvent* event, bool)
{
_note[1] = max ((framepos_t)0, adjusted_current_frame (event) - _region_view->region()->position ());
- double const x = _editor->
fram
e_to_pixel (_note[1]);
+ double const x = _editor->
sampl
e_to_pixel (_note[1]);
if (_note[1] > _note[0]) {
_drag_rect->set_x1 (x);
} else {
if (_note[1] > _note[0]) {
_drag_rect->set_x1 (x);
} else {
@@
-4905,7
+4905,7
@@
CrossfadeEdgeDrag::motion (GdkEvent*, bool)
/* how long should it be ? */
/* how long should it be ? */
- new_length = len + _editor->pixel_to_
fram
e (distance);
+ new_length = len + _editor->pixel_to_
sampl
e (distance);
/* now check with the region that this is legal */
/* now check with the region that this is legal */
@@
-4935,7
+4935,7
@@
CrossfadeEdgeDrag::finished (GdkEvent*, bool)
len = ar->fade_out()->back()->when;
}
len = ar->fade_out()->back()->when;
}
- new_length = ar->verify_xfade_bounds (len + _editor->pixel_to_
fram
e (distance), start);
+ new_length = ar->verify_xfade_bounds (len + _editor->pixel_to_
sampl
e (distance), start);
_editor->begin_reversible_command ("xfade trim");
ar->playlist()->clear_owned_changes ();
_editor->begin_reversible_command ("xfade trim");
ar->playlist()->clear_owned_changes ();
diff --git
a/gtk2_ardour/editor_imageframe.cc
b/gtk2_ardour/editor_imageframe.cc
index 9b00d53dd09a024aab0de688a18ea9de0524a30f..e36250f8b5328b8db323fb0a1e518da5e5c424d6 100644
(file)
--- a/
gtk2_ardour/editor_imageframe.cc
+++ b/
gtk2_ardour/editor_imageframe.cc
@@
-444,7
+444,7
@@
Editor::start_imageframe_grab(ArdourCanvas::Item* item, GdkEvent* event)
start_grab(event) ;
start_grab(event) ;
- drag_info.pointer_frame_offset = pixel_to_
fram
e(drag_info.grab_x) - drag_info.last_frame_position;
+ drag_info.pointer_frame_offset = pixel_to_
sampl
e(drag_info.grab_x) - drag_info.last_frame_position;
}
}
@@
-478,7
+478,7
@@
Editor::start_markerview_grab(ArdourCanvas::Item* item, GdkEvent* event)
start_grab(event) ;
start_grab(event) ;
- drag_info.pointer_frame_offset = pixel_to_
fram
e(drag_info.grab_x) - drag_info.last_frame_position ;
+ drag_info.pointer_frame_offset = pixel_to_
sampl
e(drag_info.grab_x) - drag_info.last_frame_position ;
}
}
diff --git
a/gtk2_ardour/editor_markers.cc
b/gtk2_ardour/editor_markers.cc
index 2a88fd1bfc581dc7806db73e03a46c1d31caec9c..7a774aaebac3707b49843b676b39f29f78e98f9d 100644
(file)
--- a/
gtk2_ardour/editor_markers.cc
+++ b/
gtk2_ardour/editor_markers.cc
@@
-259,7
+259,7
@@
Editor::check_marker_label (Marker* m)
/* Update just the available space between the previous marker and this one */
/* Update just the available space between the previous marker and this one */
- double const p =
fram
e_to_pixel (m->position() - (*prev)->position());
+ double const p =
sampl
e_to_pixel (m->position() - (*prev)->position());
if (m->label_on_left()) {
(*prev)->set_right_label_limit (p / 2);
if (m->label_on_left()) {
(*prev)->set_right_label_limit (p / 2);
@@
-278,7
+278,7
@@
Editor::check_marker_label (Marker* m)
/* Update just the available space between this marker and the next */
/* Update just the available space between this marker and the next */
- double const p =
fram
e_to_pixel ((*next)->position() - m->position());
+ double const p =
sampl
e_to_pixel ((*next)->position() - m->position());
if ((*next)->label_on_left()) {
m->set_right_label_limit (p / 2);
if ((*next)->label_on_left()) {
m->set_right_label_limit (p / 2);
@@
-332,7
+332,7
@@
Editor::update_marker_labels (ArdourCanvas::Group* group)
while (i != sorted.end()) {
if (prev != sorted.end()) {
while (i != sorted.end()) {
if (prev != sorted.end()) {
- double const p =
fram
e_to_pixel ((*i)->position() - (*prev)->position());
+ double const p =
sampl
e_to_pixel ((*i)->position() - (*prev)->position());
if ((*prev)->label_on_left()) {
(*i)->set_left_label_limit (p);
if ((*prev)->label_on_left()) {
(*i)->set_left_label_limit (p);
@@
-343,7
+343,7
@@
Editor::update_marker_labels (ArdourCanvas::Group* group)
}
if (next != sorted.end()) {
}
if (next != sorted.end()) {
- double const p =
fram
e_to_pixel ((*next)->position() - (*i)->position());
+ double const p =
sampl
e_to_pixel ((*next)->position() - (*i)->position());
if ((*next)->label_on_left()) {
(*i)->set_right_label_limit (p / 2);
if ((*next)->label_on_left()) {
(*i)->set_right_label_limit (p / 2);
@@
-1419,8
+1419,8
@@
Editor::update_loop_range_view (bool visibility)
if (_session->get_play_loop() && ((tll = transport_loop_location()) != 0)) {
if (_session->get_play_loop() && ((tll = transport_loop_location()) != 0)) {
- double x1 =
fram
e_to_pixel (tll->start());
- double x2 =
fram
e_to_pixel (tll->end());
+ double x1 =
sampl
e_to_pixel (tll->start());
+ double x2 =
sampl
e_to_pixel (tll->end());
transport_loop_range_rect->set_x0 (x1);
transport_loop_range_rect->set_x1 (x2);
transport_loop_range_rect->set_x0 (x1);
transport_loop_range_rect->set_x1 (x2);
@@
-1446,11
+1446,11
@@
Editor::update_punch_range_view (bool visibility)
if ((_session->config.get_punch_in() || _session->config.get_punch_out()) && ((tpl = transport_punch_location()) != 0)) {
ArdourCanvas::Rect const v = _track_canvas_viewport->visible_area ();
if (_session->config.get_punch_in()) {
if ((_session->config.get_punch_in() || _session->config.get_punch_out()) && ((tpl = transport_punch_location()) != 0)) {
ArdourCanvas::Rect const v = _track_canvas_viewport->visible_area ();
if (_session->config.get_punch_in()) {
- transport_punch_range_rect->set_x0 (
fram
e_to_pixel (tpl->start()));
- transport_punch_range_rect->set_x1 (_session->config.get_punch_out() ?
frame_to_pixel (tpl->end()) : fram
e_to_pixel (JACK_MAX_FRAMES));
+ transport_punch_range_rect->set_x0 (
sampl
e_to_pixel (tpl->start()));
+ transport_punch_range_rect->set_x1 (_session->config.get_punch_out() ?
sample_to_pixel (tpl->end()) : sampl
e_to_pixel (JACK_MAX_FRAMES));
} else {
transport_punch_range_rect->set_x0 (0);
} else {
transport_punch_range_rect->set_x0 (0);
- transport_punch_range_rect->set_x1 (_session->config.get_punch_out() ?
fram
e_to_pixel (tpl->end()) : v.width ());
+ transport_punch_range_rect->set_x1 (_session->config.get_punch_out() ?
sampl
e_to_pixel (tpl->end()) : v.width ());
}
if (visibility) {
}
if (visibility) {
diff --git
a/gtk2_ardour/editor_mouse.cc
b/gtk2_ardour/editor_mouse.cc
index 8a1c47859380ffd53b0722b78636e201134f6405..e33da47d4f8e860a2ed6dc26c222155155f51ac5 100644
(file)
--- a/
gtk2_ardour/editor_mouse.cc
+++ b/
gtk2_ardour/editor_mouse.cc
@@
-155,7
+155,7
@@
Editor::window_event_frame (GdkEvent const * event, double* pcx, double* pcy) co
*pcy = d.y;
}
*pcy = d.y;
}
- return pixel_to_
fram
e (d.x);
+ return pixel_to_
sampl
e (d.x);
}
framepos_t
}
framepos_t
@@
-179,12
+179,12
@@
Editor::canvas_event_frame (GdkEvent const * event, double* pcx, double* pcy) co
*pcy = y;
}
*pcy = y;
}
- /* note that pixel_to_
fram
e() never returns less than zero, so even if the pixel
+ /* note that pixel_to_
sampl
e() never returns less than zero, so even if the pixel
position is negative (as can be the case with motion events in particular),
the frame location is always positive.
*/
position is negative (as can be the case with motion events in particular),
the frame location is always positive.
*/
- return pixel_to_
fram
e (x);
+ return pixel_to_
sampl
e (x);
}
Gdk::Cursor*
}
Gdk::Cursor*
@@
-1700,7
+1700,7
@@
Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
case MeterBarItem:
if (!_dragging_playhead) {
case MeterBarItem:
if (!_dragging_playhead) {
- mouse_add_new_meter_event (pixel_to_
fram
e (event->button.x));
+ mouse_add_new_meter_event (pixel_to_
sampl
e (event->button.x));
}
return true;
break;
}
return true;
break;
@@
-2575,8
+2575,8
@@
Editor::hide_marker (ArdourCanvas::Item* item, GdkEvent* /*event*/)
void
Editor::reposition_zoom_rect (framepos_t start, framepos_t end)
{
void
Editor::reposition_zoom_rect (framepos_t start, framepos_t end)
{
- double x1 =
fram
e_to_pixel (start);
- double x2 =
fram
e_to_pixel (end);
+ double x1 =
sampl
e_to_pixel (start);
+ double x2 =
sampl
e_to_pixel (end);
double y2 = _full_canvas_height - 1.0;
zoom_rect->set (ArdourCanvas::Rect (x1, 1.0, x2, y2));
double y2 = _full_canvas_height - 1.0;
zoom_rect->set (ArdourCanvas::Rect (x1, 1.0, x2, y2));
diff --git
a/gtk2_ardour/editor_rulers.cc
b/gtk2_ardour/editor_rulers.cc
index 0a855d7f90efa50e4910ff5b863ad5f19a2683a6..de10a49c1c8d67cc3cc5eadecd539cc58ab27fc8 100644
(file)
--- a/
gtk2_ardour/editor_rulers.cc
+++ b/
gtk2_ardour/editor_rulers.cc
@@
-279,7
+279,7
@@
Editor::ruler_button_release (GdkEventButton* ev)
stop_canvas_autoscroll();
stop_canvas_autoscroll();
- framepos_t where = leftmost_frame + pixel_to_
fram
e (x);
+ framepos_t where = leftmost_frame + pixel_to_
sampl
e (x);
snap_to (where);
popup_ruler_menu (where);
}
snap_to (where);
popup_ruler_menu (where);
}
diff --git
a/gtk2_ardour/editor_summary.cc
b/gtk2_ardour/editor_summary.cc
index 6d7ddd05c11ef0e53b2cd68956a2c3a91303dcd8..06139ed243642041c5fdc7963a3bde8223d095b6 100644
(file)
--- a/
gtk2_ardour/editor_summary.cc
+++ b/
gtk2_ardour/editor_summary.cc
@@
-778,7
+778,7
@@
EditorSummary::set_editor_x (pair<double, double> x)
double const nx = (
((x.second - x.first) / _x_scale) /
double const nx = (
((x.second - x.first) / _x_scale) /
- _editor->
fram
e_to_pixel (_editor->current_page_frames())
+ _editor->
sampl
e_to_pixel (_editor->current_page_frames())
);
if (nx != _editor->get_current_zoom ()) {
);
if (nx != _editor->get_current_zoom ()) {
diff --git
a/gtk2_ardour/editor_videotimeline.cc
b/gtk2_ardour/editor_videotimeline.cc
index 4951a4e35a7707e5688d54fb1313f26c554d55ff..574400c2d9f16e5291aafb858ff147c723f1e86c 100644
(file)
--- a/
gtk2_ardour/editor_videotimeline.cc
+++ b/
gtk2_ardour/editor_videotimeline.cc
@@
-58,8
+58,8
@@
Editor::update_video_timeline (bool flush)
#if DEBUG
framepos_t rightmost_frame = leftmost_frame + current_page_frames();
std::cout << "VIDEO SCROLL: " << leftmost_frame << " -- " << rightmost_frame << std::endl;
#if DEBUG
framepos_t rightmost_frame = leftmost_frame + current_page_frames();
std::cout << "VIDEO SCROLL: " << leftmost_frame << " -- " << rightmost_frame << std::endl;
- std::cout << "SCROLL UNITS: " <<
frame_to_pixel(leftmost_frame) << " -- " << fram
e_to_pixel(rightmost_frame)
- << " = " <<
frame_to_pixel(rightmost_frame) - fram
e_to_pixel(leftmost_frame)
+ std::cout << "SCROLL UNITS: " <<
sample_to_pixel(leftmost_frame) << " -- " << sampl
e_to_pixel(rightmost_frame)
+ << " = " <<
sample_to_pixel(rightmost_frame) - sampl
e_to_pixel(leftmost_frame)
<< std::endl;
#endif
<< std::endl;
#endif
diff --git
a/gtk2_ardour/imageframe_view.cc
b/gtk2_ardour/imageframe_view.cc
index b73db4c0c042ff0cd22e3a31c2b14c05d54e06e3..857780ffe2754c1d714f041c921d0ff39961ad3a 100644
(file)
--- a/
gtk2_ardour/imageframe_view.cc
+++ b/
gtk2_ardour/imageframe_view.cc
@@
-208,7
+208,7
@@
ImageFrameView::set_duration(framepos_t dur, void* src)
if(ret)
{
/* handle setting the sizes of our canvas itesm based on the new duration */
if(ret)
{
/* handle setting the sizes of our canvas itesm based on the new duration */
- imageframe->property_drawwidth() = trackview.editor.
fram
e_to_pixel(get_duration());
+ imageframe->property_drawwidth() = trackview.editor.
sampl
e_to_pixel(get_duration());
}
return(ret);
}
return(ret);
diff --git
a/gtk2_ardour/marker.cc
b/gtk2_ardour/marker.cc
index ed65cc221b2b453d0640dbb26fc2f453a7415c14..20f28bd7853ccce5e18358a5321f15ba2a00125f 100644
(file)
--- a/
gtk2_ardour/marker.cc
+++ b/
gtk2_ardour/marker.cc
@@
-234,7
+234,7
@@
Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
}
frame_position = frame;
}
frame_position = frame;
- unit_position = editor.
fram
e_to_pixel (frame);
+ unit_position = editor.
sampl
e_to_pixel (frame);
unit_position -= _shift;
group = new ArdourCanvas::Group (&parent, ArdourCanvas::Duple (unit_position, 0));
unit_position -= _shift;
group = new ArdourCanvas::Group (&parent, ArdourCanvas::Duple (unit_position, 0));
@@
-429,7
+429,7
@@
Marker::setup_name_display ()
void
Marker::set_position (framepos_t frame)
{
void
Marker::set_position (framepos_t frame)
{
- unit_position = editor.
fram
e_to_pixel (frame) - _shift;
+ unit_position = editor.
sampl
e_to_pixel (frame) - _shift;
group->set_x_position (unit_position);
frame_position = frame;
}
group->set_x_position (unit_position);
frame_position = frame;
}
diff --git
a/gtk2_ardour/midi_region_view.cc
b/gtk2_ardour/midi_region_view.cc
index acc6aafdeb2dff5246ce9ccb70e4850e247f4c55..8d2067b61ffcce02fa774d4c8e5d60ec828825e1 100644
(file)
--- a/
gtk2_ardour/midi_region_view.cc
+++ b/
gtk2_ardour/midi_region_view.cc
@@
-530,7
+530,7
@@
MidiRegionView::button_release (GdkEventButton* ev)
group->canvas_to_item (event_x, event_y);
bool success;
group->canvas_to_item (event_x, event_y);
bool success;
- Evoral::MusicalTime beats = editor.get_grid_type_as_beats (success, editor.pixel_to_
fram
e (event_x));
+ Evoral::MusicalTime beats = editor.get_grid_type_as_beats (success, editor.pixel_to_
sampl
e (event_x));
if (!success) {
beats = 1;
if (!success) {
beats = 1;
@@
-541,7
+541,7
@@
MidiRegionView::button_release (GdkEventButton* ev)
*/
beats -= 1.0 / Timecode::BBT_Time::ticks_per_beat;
*/
beats -= 1.0 / Timecode::BBT_Time::ticks_per_beat;
- create_note_at (editor.pixel_to_
fram
e (event_x), event_y, beats, true);
+ create_note_at (editor.pixel_to_
sampl
e (event_x), event_y, beats, true);
}
break;
}
break;
@@
-549,7
+549,7
@@
MidiRegionView::button_release (GdkEventButton* ev)
case MouseDraw:
{
bool success;
case MouseDraw:
{
bool success;
- Evoral::MusicalTime beats = editor.get_grid_type_as_beats (success, editor.pixel_to_
fram
e (event_x));
+ Evoral::MusicalTime beats = editor.get_grid_type_as_beats (success, editor.pixel_to_
sampl
e (event_x));
if (!success) {
beats = 1;
if (!success) {
beats = 1;
@@
-560,7
+560,7
@@
MidiRegionView::button_release (GdkEventButton* ev)
*/
beats -= 1.0 / Timecode::BBT_Time::ticks_per_beat;
*/
beats -= 1.0 / Timecode::BBT_Time::ticks_per_beat;
- create_note_at (editor.pixel_to_
fram
e (event_x), event_y, beats, true);
+ create_note_at (editor.pixel_to_
sampl
e (event_x), event_y, beats, true);
break;
}
break;
}
@@
-1290,7
+1290,7
@@
MidiRegionView::display_sysexes()
}
string text = str.str();
}
string text = str.str();
- const double x = trackview.editor().
fram
e_to_pixel(source_beats_to_region_frames(time));
+ const double x = trackview.editor().
sampl
e_to_pixel(source_beats_to_region_frames(time));
double height = midi_stream_view()->contents_height();
double height = midi_stream_view()->contents_height();
@@
-1524,7
+1524,7
@@
MidiRegionView::resolve_note(uint8_t note, double end_time)
*/
const framepos_t end_time_frames = region_beats_to_region_frames(end_time);
*/
const framepos_t end_time_frames = region_beats_to_region_frames(end_time);
- _active_notes[note]->set_x1 (trackview.editor().
fram
e_to_pixel(end_time_frames));
+ _active_notes[note]->set_x1 (trackview.editor().
sampl
e_to_pixel(end_time_frames));
_active_notes[note]->set_outline_what (0xf);
_active_notes[note] = 0;
}
_active_notes[note]->set_outline_what (0xf);
_active_notes[note] = 0;
}
@@
-1542,7
+1542,7
@@
MidiRegionView::extend_active_notes()
for (unsigned i=0; i < 128; ++i) {
if (_active_notes[i]) {
for (unsigned i=0; i < 128; ++i) {
if (_active_notes[i]) {
- _active_notes[i]->set_x1 (trackview.editor().
fram
e_to_pixel(_region->length()));
+ _active_notes[i]->set_x1 (trackview.editor().
sampl
e_to_pixel(_region->length()));
}
}
}
}
}
}
@@
-1631,7
+1631,7
@@
void
MidiRegionView::update_note (Note* ev, bool update_ghost_regions)
{
boost::shared_ptr<NoteType> note = ev->note();
MidiRegionView::update_note (Note* ev, bool update_ghost_regions)
{
boost::shared_ptr<NoteType> note = ev->note();
- const double x = trackview.editor().
fram
e_to_pixel (source_beats_to_region_frames (note->time()));
+ const double x = trackview.editor().
sampl
e_to_pixel (source_beats_to_region_frames (note->time()));
const double y0 = midi_stream_view()->note_to_y(note->note());
ev->set_x0 (x);
const double y0 = midi_stream_view()->note_to_y(note->note());
ev->set_x0 (x);
@@
-1641,9
+1641,9
@@
MidiRegionView::update_note (Note* ev, bool update_ghost_regions)
if (note->length() > 0) {
const framepos_t note_end_frames = min (source_beats_to_region_frames (note->end_time()), _region->length());
if (note->length() > 0) {
const framepos_t note_end_frames = min (source_beats_to_region_frames (note->end_time()), _region->length());
- ev->set_x1 (trackview.editor().
fram
e_to_pixel (note_end_frames));
+ ev->set_x1 (trackview.editor().
sampl
e_to_pixel (note_end_frames));
} else {
} else {
- ev->set_x1 (trackview.editor().
fram
e_to_pixel (_region->length()));
+ ev->set_x1 (trackview.editor().
sampl
e_to_pixel (_region->length()));
}
ev->set_y1 (y0 + floor(midi_stream_view()->note_height()));
}
ev->set_y1 (y0 + floor(midi_stream_view()->note_height()));
@@
-1683,7
+1683,7
@@
MidiRegionView::update_hit (Hit* ev)
boost::shared_ptr<NoteType> note = ev->note();
const framepos_t note_start_frames = source_beats_to_region_frames(note->time());
boost::shared_ptr<NoteType> note = ev->note();
const framepos_t note_start_frames = source_beats_to_region_frames(note->time());
- const double x = trackview.editor().
fram
e_to_pixel(note_start_frames);
+ const double x = trackview.editor().
sampl
e_to_pixel(note_start_frames);
const double diamond_size = midi_stream_view()->note_height() / 2.0;
const double y = midi_stream_view()->note_to_y(note->note()) + ((diamond_size-2) / 4.0);
const double diamond_size = midi_stream_view()->note_height() / 2.0;
const double y = midi_stream_view()->note_to_y(note->note()) + ((diamond_size-2) / 4.0);
@@
-1805,7
+1805,7
@@
void
MidiRegionView::add_canvas_patch_change (MidiModel::PatchChangePtr patch, const string& displaytext, bool /*active_channel*/)
{
framecnt_t region_frames = source_beats_to_region_frames (patch->time());
MidiRegionView::add_canvas_patch_change (MidiModel::PatchChangePtr patch, const string& displaytext, bool /*active_channel*/)
{
framecnt_t region_frames = source_beats_to_region_frames (patch->time());
- const double x = trackview.editor().
fram
e_to_pixel (region_frames);
+ const double x = trackview.editor().
sampl
e_to_pixel (region_frames);
double const height = midi_stream_view()->contents_height();
double const height = midi_stream_view()->contents_height();
@@
-2471,10
+2471,10
@@
MidiRegionView::note_dropped(NoteBase *, frameoffset_t dt, int8_t dnote)
* @return Snapped frame relative to the region position.
*/
framepos_t
* @return Snapped frame relative to the region position.
*/
framepos_t
-MidiRegionView::snap_pixel_to_
fram
e(double x)
+MidiRegionView::snap_pixel_to_
sampl
e(double x)
{
PublicEditor& editor (trackview.editor());
{
PublicEditor& editor (trackview.editor());
- return snap_frame_to_frame (editor.pixel_to_
fram
e (x));
+ return snap_frame_to_frame (editor.pixel_to_
sampl
e (x));
}
/** @param x Pixel relative to the region position.
}
/** @param x Pixel relative to the region position.
@@
-2483,21
+2483,21
@@
MidiRegionView::snap_pixel_to_frame(double x)
double
MidiRegionView::snap_to_pixel(double x)
{
double
MidiRegionView::snap_to_pixel(double x)
{
- return (double) trackview.editor().
frame_to_pixel(snap_pixel_to_fram
e(x));
+ return (double) trackview.editor().
sample_to_pixel(snap_pixel_to_sampl
e(x));
}
double
MidiRegionView::get_position_pixels()
{
framepos_t region_frame = get_position();
}
double
MidiRegionView::get_position_pixels()
{
framepos_t region_frame = get_position();
- return trackview.editor().
fram
e_to_pixel(region_frame);
+ return trackview.editor().
sampl
e_to_pixel(region_frame);
}
double
MidiRegionView::get_end_position_pixels()
{
framepos_t frame = get_position() + get_duration ();
}
double
MidiRegionView::get_end_position_pixels()
{
framepos_t frame = get_position() + get_duration ();
- return trackview.editor().
fram
e_to_pixel(frame);
+ return trackview.editor().
sampl
e_to_pixel(frame);
}
framepos_t
}
framepos_t
@@
-2618,7
+2618,7
@@
MidiRegionView::update_resizing (NoteBase* primary, bool at_front, double delta_
if (!cursor_set) {
double beats;
if (!cursor_set) {
double beats;
- beats = snap_pixel_to_
fram
e (current_x);
+ beats = snap_pixel_to_
sampl
e (current_x);
beats = region_frames_to_region_beats (beats);
double len;
beats = region_frames_to_region_beats (beats);
double len;
@@
-2682,7
+2682,7
@@
MidiRegionView::commit_resizing (NoteBase* primary, bool at_front, double delta_
}
/* Convert that to a frame within the source */
}
/* Convert that to a frame within the source */
- current_x = snap_pixel_to_
fram
e (current_x) + _region->start ();
+ current_x = snap_pixel_to_
sampl
e (current_x) + _region->start ();
/* and then to beats */
current_x = region_frames_to_region_beats (current_x);
/* and then to beats */
current_x = region_frames_to_region_beats (current_x);
@@
-3494,7
+3494,7
@@
MidiRegionView::update_ghost_note (double x, double y)
PublicEditor& editor = trackview.editor ();
PublicEditor& editor = trackview.editor ();
- framepos_t const unsnapped_frame = editor.pixel_to_
fram
e (x);
+ framepos_t const unsnapped_frame = editor.pixel_to_
sampl
e (x);
framecnt_t grid_frames;
framepos_t const f = snap_frame_to_grid_underneath (unsnapped_frame, grid_frames);
framecnt_t grid_frames;
framepos_t const f = snap_frame_to_grid_underneath (unsnapped_frame, grid_frames);
@@
-3635,7
+3635,7
@@
MidiRegionView::move_step_edit_cursor (Evoral::MusicalTime pos)
_step_edit_cursor_position = pos;
if (_step_edit_cursor) {
_step_edit_cursor_position = pos;
if (_step_edit_cursor) {
- double pixel = trackview.editor().
fram
e_to_pixel (region_beats_to_region_frames (pos));
+ double pixel = trackview.editor().
sampl
e_to_pixel (region_beats_to_region_frames (pos));
_step_edit_cursor->set_x0 (pixel);
set_step_edit_cursor_width (_step_edit_cursor_width);
}
_step_edit_cursor->set_x0 (pixel);
set_step_edit_cursor_width (_step_edit_cursor_width);
}
@@
-3655,7
+3655,7
@@
MidiRegionView::set_step_edit_cursor_width (Evoral::MusicalTime beats)
_step_edit_cursor_width = beats;
if (_step_edit_cursor) {
_step_edit_cursor_width = beats;
if (_step_edit_cursor) {
- _step_edit_cursor->set_x1 (_step_edit_cursor->x0() + trackview.editor().
fram
e_to_pixel (region_beats_to_region_frames (beats)));
+ _step_edit_cursor->set_x1 (_step_edit_cursor->x0() + trackview.editor().
sampl
e_to_pixel (region_beats_to_region_frames (beats)));
}
}
}
}
diff --git
a/gtk2_ardour/midi_region_view.h
b/gtk2_ardour/midi_region_view.h
index d1b646ce61b544f22beb1463650a4d7dfdb929cc..a292bdd10ed9c076f6190e90bb568dc9bf2401f2 100644
(file)
--- a/
gtk2_ardour/midi_region_view.h
+++ b/
gtk2_ardour/midi_region_view.h
@@
-253,7
+253,7
@@
public:
* @param x a pixel coordinate relative to region start
* @return the snapped framepos_t coordinate relative to region start
*/
* @param x a pixel coordinate relative to region start
* @return the snapped framepos_t coordinate relative to region start
*/
- framepos_t snap_pixel_to_
fram
e(double x);
+ framepos_t snap_pixel_to_
sampl
e(double x);
/** Convert a timestamp in beats into frames (both relative to region position) */
framepos_t region_beats_to_region_frames(double beats) const;
/** Convert a timestamp in beats into frames (both relative to region position) */
framepos_t region_beats_to_region_frames(double beats) const;
diff --git
a/gtk2_ardour/midi_streamview.cc
b/gtk2_ardour/midi_streamview.cc
index 51988412916661999b68a1c56c0dd0d29dfadf23..ea3c0ffeda7d84f37f1b50659957969606b8a647 100644
(file)
--- a/
gtk2_ardour/midi_streamview.cc
+++ b/
gtk2_ardour/midi_streamview.cc
@@
-479,7
+479,7
@@
MidiStreamView::setup_rec_box ()
boost::shared_ptr<MidiTrack> mt = _trackview.midi_track(); /* we know what it is already */
framepos_t const frame_pos = mt->current_capture_start ();
boost::shared_ptr<MidiTrack> mt = _trackview.midi_track(); /* we know what it is already */
framepos_t const frame_pos = mt->current_capture_start ();
- gdouble const xstart = _trackview.editor().
fram
e_to_pixel (frame_pos);
+ gdouble const xstart = _trackview.editor().
sampl
e_to_pixel (frame_pos);
gdouble const xend = xstart;
uint32_t fill_color;
gdouble const xend = xstart;
uint32_t fill_color;
diff --git
a/gtk2_ardour/public_editor.h
b/gtk2_ardour/public_editor.h
index 0c82d92d5e046a1f971ce94fc3f53b4161e7cf8e..8a2ea6efd3f8f53b528104c1859d5531253b6d28 100644
(file)
--- a/
gtk2_ardour/public_editor.h
+++ b/
gtk2_ardour/public_editor.h
@@
-198,9
+198,9
@@
class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
virtual void separate_region_from_selection () = 0;
virtual void transition_to_rolling (bool fwd) = 0;
virtual void separate_region_from_selection () = 0;
virtual void transition_to_rolling (bool fwd) = 0;
- virtual framepos_t pixel_to_
fram
e (double pixel) const = 0;
- virtual double
fram
e_to_pixel (framepos_t frame) const = 0;
- virtual double
fram
e_to_pixel_unrounded (framepos_t frame) const = 0;
+ virtual framepos_t pixel_to_
sampl
e (double pixel) const = 0;
+ virtual double
sampl
e_to_pixel (framepos_t frame) const = 0;
+ virtual double
sampl
e_to_pixel_unrounded (framepos_t frame) const = 0;
virtual Selection& get_selection () const = 0;
virtual Selection& get_cut_buffer () const = 0;
virtual void track_mixer_selection () = 0;
virtual Selection& get_selection () const = 0;
virtual Selection& get_cut_buffer () const = 0;
virtual void track_mixer_selection () = 0;
diff --git
a/gtk2_ardour/region_view.cc
b/gtk2_ardour/region_view.cc
index a1350c04b0f856ad0c12bdd0124831d57c6c033b..88f7cf9387e00692a36a3857707dd099909c5411 100644
(file)
--- a/
gtk2_ardour/region_view.cc
+++ b/
gtk2_ardour/region_view.cc
@@
-244,8
+244,8
@@
RegionView::set_silent_frames (const AudioIntervalResult& silences, double /*thr
/* coordinates for the rect are relative to the regionview origin */
/* coordinates for the rect are relative to the regionview origin */
- cr->set_x0 (trackview.editor().
fram
e_to_pixel (i->first - _region->start()));
- cr->set_x1 (trackview.editor().
fram
e_to_pixel (i->second - _region->start()));
+ cr->set_x0 (trackview.editor().
sampl
e_to_pixel (i->first - _region->start()));
+ cr->set_x1 (trackview.editor().
sampl
e_to_pixel (i->second - _region->start()));
cr->set_y0 (1);
cr->set_y1 (_height - 2);
cr->set_outline (false);
cr->set_y0 (1);
cr->set_y1 (_height - 2);
cr->set_outline (false);
@@
-279,7
+279,7
@@
RegionView::set_silent_frames (const AudioIntervalResult& silences, double /*thr
/* both positions are relative to the region start offset in source */
/* both positions are relative to the region start offset in source */
- _silence_text->set_x_position (trackview.editor().
fram
e_to_pixel (silences.front().first - _region->start()) + 10.0);
+ _silence_text->set_x_position (trackview.editor().
sampl
e_to_pixel (silences.front().first - _region->start()) + 10.0);
_silence_text->set_y_position (20.0);
double ms = (float) shortest/_region->session().frame_rate();
_silence_text->set_y_position (20.0);
double ms = (float) shortest/_region->session().frame_rate();
@@
-798,14
+798,14
@@
RegionView::update_coverage_frames (LayerDisplay d)
/* finish off any old rect, if required */
if (cr && me != new_me) {
/* finish off any old rect, if required */
if (cr && me != new_me) {
- cr->set_x1 (trackview.editor().
fram
e_to_pixel (t - position));
+ cr->set_x1 (trackview.editor().
sampl
e_to_pixel (t - position));
}
/* start off any new rect, if required */
if (cr == 0 || me != new_me) {
cr = new ArdourCanvas::Rectangle (group);
_coverage_frames.push_back (cr);
}
/* start off any new rect, if required */
if (cr == 0 || me != new_me) {
cr = new ArdourCanvas::Rectangle (group);
_coverage_frames.push_back (cr);
- cr->set_x0 (trackview.editor().
fram
e_to_pixel (t - position));
+ cr->set_x0 (trackview.editor().
sampl
e_to_pixel (t - position));
cr->set_y0 (1);
cr->set_y1 (_height + 1);
cr->set_outline (false);
cr->set_y0 (1);
cr->set_y1 (_height + 1);
cr->set_outline (false);
@@
-823,7
+823,7
@@
RegionView::update_coverage_frames (LayerDisplay d)
if (cr) {
/* finish off the last rectangle */
if (cr) {
/* finish off the last rectangle */
- cr->set_x1 (trackview.editor().
fram
e_to_pixel (end - position));
+ cr->set_x1 (trackview.editor().
sampl
e_to_pixel (end - position));
}
if (frame_handle_start) {
}
if (frame_handle_start) {
diff --git
a/gtk2_ardour/streamview.cc
b/gtk2_ardour/streamview.cc
index 065f6b711c20c6651b0a1474698cb70e82f5e4c2..e2146d62ab50202fdd65ad3fc0d6867fb77aa9e0 100644
(file)
--- a/
gtk2_ardour/streamview.cc
+++ b/
gtk2_ardour/streamview.cc
@@
-161,8
+161,8
@@
StreamView::set_frames_per_pixel (double fpp)
for (vector<RecBoxInfo>::iterator xi = rec_rects.begin(); xi != rec_rects.end(); ++xi) {
RecBoxInfo &recbox = (*xi);
for (vector<RecBoxInfo>::iterator xi = rec_rects.begin(); xi != rec_rects.end(); ++xi) {
RecBoxInfo &recbox = (*xi);
- ArdourCanvas::Coord const xstart = _trackview.editor().
fram
e_to_pixel (recbox.start);
- ArdourCanvas::Coord const xend = _trackview.editor().
fram
e_to_pixel (recbox.start + recbox.length);
+ ArdourCanvas::Coord const xstart = _trackview.editor().
sampl
e_to_pixel (recbox.start);
+ ArdourCanvas::Coord const xend = _trackview.editor().
sampl
e_to_pixel (recbox.start + recbox.length);
recbox.rectangle->set_x0 (xstart);
recbox.rectangle->set_x1 (xend);
recbox.rectangle->set_x0 (xstart);
recbox.rectangle->set_x1 (xend);
@@
-426,14
+426,14
@@
StreamView::update_rec_box ()
case NonLayered:
case Normal:
rect.length = at - rect.start;
case NonLayered:
case Normal:
rect.length = at - rect.start;
- xstart = _trackview.editor().
fram
e_to_pixel (rect.start);
- xend = _trackview.editor().
fram
e_to_pixel (at);
+ xstart = _trackview.editor().
sampl
e_to_pixel (rect.start);
+ xend = _trackview.editor().
sampl
e_to_pixel (at);
break;
case Destructive:
rect.length = 2;
break;
case Destructive:
rect.length = 2;
- xstart = _trackview.editor().
fram
e_to_pixel (_trackview.track()->current_capture_start());
- xend = _trackview.editor().
fram
e_to_pixel (at);
+ xstart = _trackview.editor().
sampl
e_to_pixel (_trackview.track()->current_capture_start());
+ xend = _trackview.editor().
sampl
e_to_pixel (at);
break;
}
break;
}
diff --git
a/gtk2_ardour/time_axis_view.cc
b/gtk2_ardour/time_axis_view.cc
index 122a44556404e174c0f8f25332eeeebcdfa7bd06..cd1f7229d9e3cc30ab79683791fd8d29fb66f9c3 100644
(file)
--- a/
gtk2_ardour/time_axis_view.cc
+++ b/
gtk2_ardour/time_axis_view.cc
@@
-856,8
+856,8
@@
TimeAxisView::show_selection (TimeSelection& ts)
rect = get_selection_rect ((*i).id);
rect = get_selection_rect ((*i).id);
- x1 = _editor.
fram
e_to_pixel (start);
- x2 = _editor.
fram
e_to_pixel (start + cnt - 1);
+ x1 = _editor.
sampl
e_to_pixel (start);
+ x2 = _editor.
sampl
e_to_pixel (start + cnt - 1);
y2 = current_height();
rect->rect->set (ArdourCanvas::Rect (x1, 1, x2, y2));
y2 = current_height();
rect->rect->set (ArdourCanvas::Rect (x1, 1, x2, y2));
diff --git
a/gtk2_ardour/time_axis_view_item.cc
b/gtk2_ardour/time_axis_view_item.cc
index 4fd2b562f822f2544ec8a3d5fcc86c1d2a9d2af2..01d77cf78ae82ffc6604cceca4adfc9e39bcd29f 100644
(file)
--- a/
gtk2_ardour/time_axis_view_item.cc
+++ b/
gtk2_ardour/time_axis_view_item.cc
@@
-176,7
+176,7
@@
TimeAxisViewItem::init (const string& it_name, double fpp, Gdk::Color const & ba
if (visibility & ShowFrame) {
frame = new ArdourCanvas::Rectangle (group,
ArdourCanvas::Rect (0.0, 1.0,
if (visibility & ShowFrame) {
frame = new ArdourCanvas::Rectangle (group,
ArdourCanvas::Rect (0.0, 1.0,
- trackview.editor().
fram
e_to_pixel(duration),
+ trackview.editor().
sampl
e_to_pixel(duration),
trackview.current_height()));
frame->set_outline_width (1);
trackview.current_height()));
frame->set_outline_width (1);
@@
-198,11
+198,11
@@
TimeAxisViewItem::init (const string& it_name, double fpp, Gdk::Color const & ba
if (visibility & FullWidthNameHighlight) {
name_highlight = new ArdourCanvas::Rectangle (group,
if (visibility & FullWidthNameHighlight) {
name_highlight = new ArdourCanvas::Rectangle (group,
- ArdourCanvas::Rect (0.0, trackview.editor().
fram
e_to_pixel(item_duration),
+ ArdourCanvas::Rect (0.0, trackview.editor().
sampl
e_to_pixel(item_duration),
trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE, trackview.current_height()));
} else {
name_highlight = new ArdourCanvas::Rectangle (group,
trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE, trackview.current_height()));
} else {
name_highlight = new ArdourCanvas::Rectangle (group,
- ArdourCanvas::Rect (1.0, trackview.editor().
fram
e_to_pixel(item_duration) - 1,
+ ArdourCanvas::Rect (1.0, trackview.editor().
sampl
e_to_pixel(item_duration) - 1,
trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE, trackview.current_height()));
}
trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE, trackview.current_height()));
}
@@
-350,7
+350,7
@@
TimeAxisViewItem::set_duration (framecnt_t dur, void* src)
item_duration = dur;
item_duration = dur;
- reset_width_dependent_items (trackview.editor().
fram
e_to_pixel (dur));
+ reset_width_dependent_items (trackview.editor().
sampl
e_to_pixel (dur));
DurationChanged (dur, src); /* EMIT_SIGNAL */
return true;
DurationChanged (dur, src); /* EMIT_SIGNAL */
return true;
@@
-523,7
+523,7
@@
TimeAxisViewItem::set_name_text(const string& new_name)
return;
}
return;
}
- last_item_width = trackview.editor().
fram
e_to_pixel(item_duration);
+ last_item_width = trackview.editor().
sampl
e_to_pixel(item_duration);
name_pixbuf_width = pixel_width (new_name, NAME_FONT) + 2;
name_pixbuf->set (pixbuf_from_string(new_name, NAME_FONT, name_pixbuf_width, NAME_HEIGHT, Gdk::Color ("#000000")));
}
name_pixbuf_width = pixel_width (new_name, NAME_FONT) + 2;
name_pixbuf->set (pixbuf_from_string(new_name, NAME_FONT, name_pixbuf_width, NAME_HEIGHT, Gdk::Color ("#000000")));
}
@@
-901,7
+901,7
@@
TimeAxisViewItem::reset_name_width (double /*pixel_width*/)
return;
}
return;
}
- it_width = trackview.editor().
fram
e_to_pixel(item_duration);
+ it_width = trackview.editor().
sampl
e_to_pixel(item_duration);
pb_width = name_pixbuf_width;
pixbuf_holds_full_name = last_item_width > pb_width + NAME_X_OFFSET;
pb_width = name_pixbuf_width;
pixbuf_holds_full_name = last_item_width > pb_width + NAME_X_OFFSET;
diff --git
a/gtk2_ardour/video_image_frame.cc
b/gtk2_ardour/video_image_frame.cc
index 8e7100113e75db802ddc636f0600e9f4397fac68..d4d8623e5c87a8bab05a5c13a6691c267f7138e7 100644
(file)
--- a/
gtk2_ardour/video_image_frame.cc
+++ b/
gtk2_ardour/video_image_frame.cc
@@
-56,7
+56,7
@@
VideoImageFrame::VideoImageFrame (PublicEditor& ed, ArdourCanvas::Group& parent,
printf("New VideoImageFrame (%ix%i) %s - %s\n", w, h, vsurl.c_str(), vfn.c_str());
#endif
printf("New VideoImageFrame (%ix%i) %s - %s\n", w, h, vsurl.c_str(), vfn.c_str());
#endif
- unit_position = editor.
fram
e_to_pixel (frame_position);
+ unit_position = editor.
sampl
e_to_pixel (frame_position);
group = new ArdourCanvas::Group (_parent, ArdourCanvas::Duple(unit_position, 1.0));
img_pixbuf = new ArdourCanvas::Pixbuf(group);
group = new ArdourCanvas::Group (_parent, ArdourCanvas::Duple(unit_position, 1.0));
img_pixbuf = new ArdourCanvas::Pixbuf(group);
@@
-85,7
+85,7
@@
VideoImageFrame::~VideoImageFrame ()
void
VideoImageFrame::set_position (framepos_t frame)
{
void
VideoImageFrame::set_position (framepos_t frame)
{
- double new_unit_position = editor.
fram
e_to_pixel (frame);
+ double new_unit_position = editor.
sampl
e_to_pixel (frame);
group->move (ArdourCanvas::Duple (new_unit_position - unit_position, 0.0));
frame_position = frame;
unit_position = new_unit_position;
group->move (ArdourCanvas::Duple (new_unit_position - unit_position, 0.0));
frame_position = frame;
unit_position = new_unit_position;
diff --git
a/gtk2_ardour/video_timeline.cc
b/gtk2_ardour/video_timeline.cc
index 5fc96d95f8813526bc9c1947b3eec29ea4a91c71..6e5d5d4e11f22411cc18b29760564f9a03d213d3 100644
(file)
--- a/
gtk2_ardour/video_timeline.cc
+++ b/
gtk2_ardour/video_timeline.cc
@@
-302,7
+302,7
@@
VideoTimeLine::update_video_timeline()
if (_session->timecode_frames_per_second() == 0 ) return;
}
if (_session->timecode_frames_per_second() == 0 ) return;
}
- double frames_per_unit = editor->pixel_to_
fram
e(1.0);
+ double frames_per_unit = editor->pixel_to_
sampl
e(1.0);
framepos_t leftmost_frame = editor->leftmost_position();
/* Outline:
framepos_t leftmost_frame = editor->leftmost_position();
/* Outline:
diff --git
a/libs/canvas/rectangle.cc
b/libs/canvas/rectangle.cc
index cff7beffd47974be342c545f34b802e77335ef2e..9395cc774d808583c7d449a227defde2dd45c8ea 100644
(file)
--- a/
libs/canvas/rectangle.cc
+++ b/
libs/canvas/rectangle.cc
@@
-63,9
+63,14
@@
Rectangle::render (Rect const & /*area*/, Cairo::RefPtr<Cairo::Context> context)
if (_outline) {
if (_outline_what == What (LEFT|RIGHT|BOTTOM|TOP)) {
if (_outline) {
if (_outline_what == What (LEFT|RIGHT|BOTTOM|TOP)) {
- context->rectangle (plot.x0, plot.y0, plot.width(), plot.height());
- setup_outline_context (context);
- context->stroke ();
+
+ /* if we filled and use full outline, we are already done */
+
+ if (!_fill) {
+ context->rectangle (plot.x0, plot.y0, plot.width(), plot.height());
+ setup_outline_context (context);
+ context->stroke ();
+ }
} else {
} else {