title color fader/tweaks, bg_color bcbitmap fix, inst.sh fix, lang fr pref tweaks
[goodguy/cinelerra.git] / cinelerra-5.1 / guicast / bcbitmap.C
index e430c071058df5b1789f2b9de103631ae8b1754f..2d8b621fd2aee04fa71406e418a9b08649506aef 100644 (file)
@@ -329,7 +329,6 @@ int BC_Bitmap::initialize(BC_WindowBase *parent_window,
        this->use_shm = !use_shm ? 0 : need_shm();
         this->shm_reply = this->use_shm && resources->shm_reply ? 1 : 0;
        // dont use shm for less than one page
-       this->bg_color = parent_window->bg_color;
        if( !this->avail_lock )
                this->avail_lock = new Mutex("BC_Bitmap::avail_lock");
        else
@@ -483,12 +482,6 @@ int BC_Bitmap::need_shm()
                parent_window->get_resources()->use_shm > 0 ? 1 : 0;
 }
 
-int BC_Bitmap::set_bg_color(int color)
-{
-       this->bg_color = color;
-       return 0;
-}
-
 int BC_Bitmap::invert()
 {
        for( int j=0; j<buffer_count; ++j ) {
@@ -620,16 +613,21 @@ int BC_Bitmap::read_drawable(Drawable &pixmap, int source_x, int source_y, VFram
 // ============================ Decoding VFrames
 
 int BC_Bitmap::read_frame(VFrame *frame, int x1, int y1, int x2, int y2)
+{
+       return read_frame(frame, x1, y1, x2, y2, parent_window->get_bg_color());
+}
+
+int BC_Bitmap::read_frame(VFrame *frame, int x1, int y1, int x2, int y2, int bg_color)
 {
        return read_frame(frame,
                0, 0, frame->get_w(), frame->get_h(),
-               x1, y1, x2 - x1, y2 - y1);
+               x1, y1, x2 - x1, y2 - y1, bg_color);
 }
 
 
 int BC_Bitmap::read_frame(VFrame *frame,
        int in_x, int in_y, int in_w, int in_h,
-       int out_x, int out_y, int out_w, int out_h)
+       int out_x, int out_y, int out_w, int out_h, int bg_color)
 {
        BC_BitmapImage *bfr = cur_bfr();
        if( hardware_scaling() && frame->get_color_model() == color_model ) {