X-Git-Url: https://cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fresourcepixmap.C;h=eb27656179f97795e7bc18d79c5cc9b533d29f0b;hb=c6a143f0f3e245d79881da50e61e6f35c556d88d;hp=2ffd86ca58287ecc74747ca45926331e82f4f38f;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/resourcepixmap.C b/cinelerra-5.1/cinelerra/resourcepixmap.C index 2ffd86ca..eb276561 100644 --- a/cinelerra-5.1/cinelerra/resourcepixmap.C +++ b/cinelerra-5.1/cinelerra/resourcepixmap.C @@ -46,6 +46,7 @@ #include "localsession.h" #include "mwindow.h" #include "mwindowgui.h" +#include "preferences.h" #include "renderengine.h" #include "resourcethread.h" #include "resourcepixmap.h" @@ -241,6 +242,27 @@ void ResourcePixmap::draw_data(TrackCanvas *canvas, SET_TRACE } + +VFrame *ResourcePixmap::change_title_color(VFrame *title_bg, int color) +{ + if( color < 0 ) return title_bg; + int colormodel = title_bg->get_color_model(); + int bpp = BC_CModels::calculate_pixelsize(colormodel); + int tw = title_bg->get_w(), th = title_bg->get_h(); + VFrame *title_bar = new VFrame(tw, th, colormodel); + uint8_t cr = (color>>16), cg = (color>>8), cb = (color>>0); + uint8_t **bar_rows = title_bar->get_rows(); + for( int y=0; y