mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 14:19:55 -06:00
libui/GTK: add area BG color support
This commit is contained in:
@ -134,6 +134,12 @@ static gboolean areaWidget_draw(GtkWidget *w, cairo_t *cr)
|
|||||||
dp.ClipY = clipY0;
|
dp.ClipY = clipY0;
|
||||||
dp.ClipWidth = clipX1 - clipX0;
|
dp.ClipWidth = clipX1 - clipX0;
|
||||||
dp.ClipHeight = clipY1 - clipY0;
|
dp.ClipHeight = clipY1 - clipY0;
|
||||||
|
|
||||||
|
if (a->bgR != -1)
|
||||||
|
{
|
||||||
|
cairo_set_source_rgb(cr, a->bgR/255.0, a->bgG/255.0, a->bgB/255.0);
|
||||||
|
cairo_paint(cr);
|
||||||
|
}
|
||||||
|
|
||||||
// no need to save or restore the graphics state to reset transformations; GTK+ does that for us
|
// no need to save or restore the graphics state to reset transformations; GTK+ does that for us
|
||||||
(*(a->ah->Draw))(a->ah, a, &dp);
|
(*(a->ah->Draw))(a->ah, a, &dp);
|
||||||
|
Reference in New Issue
Block a user