summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-13 17:17:46 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-13 17:17:46 +0300
commit83694ec2551f65c65a51d79324665ce22f98df6d (patch)
tree5fffc40567f7b9a8d3418fc5f1c305732193e5ce
parent9e4484537431779d7027d12dbdb28d23f232a4af (diff)
DocumentWidget: Drawing images that have alpha
-rw-r--r--src/ui/documentwidget.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 9b6ad509..1e9dd759 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -1593,6 +1593,7 @@ static void drawRun_DrawContext_(void *context, const iGmRun *run) {
1593 SDL_Texture *tex = imageTexture_GmDocument(d->widget->doc, run->imageId); 1593 SDL_Texture *tex = imageTexture_GmDocument(d->widget->doc, run->imageId);
1594 if (tex) { 1594 if (tex) {
1595 const iRect dst = moved_Rect(run->visBounds, origin); 1595 const iRect dst = moved_Rect(run->visBounds, origin);
1596 fillRect_Paint(&d->paint, dst, tmBackground_ColorId); /* in case the image has alpha */
1596 SDL_RenderCopy(d->paint.dst->render, tex, NULL, 1597 SDL_RenderCopy(d->paint.dst->render, tex, NULL,
1597 &(SDL_Rect){ dst.pos.x, dst.pos.y, dst.size.x, dst.size.y }); 1598 &(SDL_Rect){ dst.pos.x, dst.pos.y, dst.size.x, dst.size.y });
1598 } 1599 }