X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fimageframe_view.cc;h=2a419ee2752c3b2910e34e9e515ffaab58cd980b;hb=9153ef32975efb86cc1609d72a0ea1ebd149faab;hp=ac17a7cc1a2bf8d13b1b0739c053289450d5406e;hpb=7ff370e79895d7eb293e7214689b791bd98415fb;p=ardour.git diff --git a/gtk2_ardour/imageframe_view.cc b/gtk2_ardour/imageframe_view.cc index ac17a7cc1a..2a419ee275 100644 --- a/gtk2_ardour/imageframe_view.cc +++ b/gtk2_ardour/imageframe_view.cc @@ -15,7 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id$ */ #include @@ -62,8 +61,8 @@ ImageFrameView::ImageFrameView(const string & item_id, ImageFrameTimeAxisGroup* item_group, double spu, Gdk::Color& basic_color, - jack_nframes_t start, - jack_nframes_t duration, + nframes_t start, + nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, @@ -92,9 +91,9 @@ ImageFrameView::ImageFrameView(const string & item_id, //calculate our image width based on the track height double im_ratio = (double)width/(double)height ; - double im_width = ((double)(trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE) * im_ratio) ; + double im_width = ((double)(trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE) * im_ratio) ; - imageframe = new ImageFrame (*group, pbuf, 1.0, 1.0, ANCHOR_NW, im_width, (trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE)); + imageframe = new ImageFrame (*group, pbuf, 1.0, 1.0, ANCHOR_NW, im_width, (trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE)); frame_handle_start->signal_event().connect (bind (mem_fun (trackview.editor, &PublicEditor::canvas_imageframe_start_handle_event), frame_handle_start, this)); frame_handle_end->signal_event().connect (bind (mem_fun (trackview.editor, &PublicEditor::canvas_imageframe_end_handle_event), frame_handle_end, this)); @@ -153,11 +152,8 @@ ImageFrameView::~ImageFrameView() } } - if(imageframe) - { -delete imageframe; - imageframe = 0 ; - } + delete imageframe; + imageframe = 0 ; } @@ -172,9 +168,9 @@ delete imageframe; * @return true if the position change was a success, false otherwise */ bool -ImageFrameView::set_position(jack_nframes_t pos, void* src, double* delta) +ImageFrameView::set_position(nframes_t pos, void* src, double* delta) { - jack_nframes_t old_pos = frame_position ; + nframes_t old_pos = frame_position ; // do the standard stuff bool ret = TimeAxisViewItem::set_position(pos, src, delta) ; @@ -186,7 +182,7 @@ ImageFrameView::set_position(jack_nframes_t pos, void* src, double* delta) { // calculate the offset of the marker MarkerView* mv = (MarkerView*)*i ; - jack_nframes_t marker_old_pos = mv->get_position() ; + nframes_t marker_old_pos = mv->get_position() ; mv->set_position(pos + (marker_old_pos - old_pos), src) ; } @@ -203,7 +199,7 @@ ImageFrameView::set_position(jack_nframes_t pos, void* src, double* delta) * @return true if the duration change was succesful, false otherwise */ bool -ImageFrameView::set_duration(jack_nframes_t dur, void* src) +ImageFrameView::set_duration(nframes_t dur, void* src) { /* do the standard stuff */ bool ret = TimeAxisViewItem::set_duration(dur, src) ; @@ -266,11 +262,11 @@ ImageFrameView::set_height (gdouble h) frame->raise_to_top(); imageframe->raise_to_top(); name_highlight->raise_to_top(); - name_text->raise_to_top(); + name_pixbuf->raise_to_top(); frame_handle_start->raise_to_top(); frame_handle_end->raise_to_top(); - name_text->property_y() = h - TimeAxisViewItem::NAME_Y_OFFSET; + name_pixbuf->property_y() = h - TimeAxisViewItem::NAME_Y_OFFSET; frame->property_y2() = h; name_highlight->property_y1() = (gdouble) h - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE;