X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ftheme.C;fp=cinelerra-5.1%2Fcinelerra%2Ftheme.C;h=5a1d95d6d5a83f72eca472f10f1e7ddc16a7b6ca;hp=96f8b80f9f95b2aaa89c472b2b6fbb2fb416f661;hb=258d9cb69d560f40961acdd20866e12e940c2f93;hpb=0b9b147db71b52ac26c6916569a1e407bb2651bc diff --git a/cinelerra-5.1/cinelerra/theme.C b/cinelerra-5.1/cinelerra/theme.C index 96f8b80f..5a1d95d6 100644 --- a/cinelerra-5.1/cinelerra/theme.C +++ b/cinelerra-5.1/cinelerra/theme.C @@ -1334,8 +1334,18 @@ void Theme::draw_setformat_bg(SetFormatWindow *window) } - - - +int Theme::get_color_title_bg() +{ + VFrame *title_bg = get_image("title_bg_data"); + int tw = title_bg->get_w(), th = title_bg->get_h(); + int colormodel = title_bg->get_color_model(); + int bpp = BC_CModels::calculate_pixelsize(colormodel); + uint8_t **rows = title_bg->get_rows(); + int cx = tw / 2, cy = th / 2; + uint8_t *bp = rows[cy] + cx * bpp; + int br = bp[0], bg = bp[1], bb = bp[2]; + int color = (br<<16) | (bg<<8) | (bb<<0); + return color; +}