GUACAMOLE-490: Merge take channel mask into account when rendering image streams to buffers.

This commit is contained in:
Nick Couchman 2018-01-27 17:17:24 -05:00
commit 57428a95aa

View File

@ -18,6 +18,7 @@
*/ */
#include "config.h" #include "config.h"
#include "display.h"
#include "image-stream.h" #include "image-stream.h"
#include "jpeg.h" #include "jpeg.h"
#include "log.h" #include "log.h"
@ -139,6 +140,7 @@ int guacenc_image_stream_end(guacenc_image_stream* stream,
/* Draw surface to buffer */ /* Draw surface to buffer */
if (buffer->cairo != NULL) { if (buffer->cairo != NULL) {
cairo_set_operator(buffer->cairo, guacenc_display_cairo_operator(stream->mask));
cairo_set_source_surface(buffer->cairo, surface, stream->x, stream->y); cairo_set_source_surface(buffer->cairo, surface, stream->x, stream->y);
cairo_rectangle(buffer->cairo, stream->x, stream->y, width, height); cairo_rectangle(buffer->cairo, stream->x, stream->y, width, height);
cairo_fill(buffer->cairo); cairo_fill(buffer->cairo);