From 3e747d769f63fde60f6095bd1ae7c651d4237f39 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 4 Jun 2016 18:36:00 +0200 Subject: Make Colour movabl;e and make Image contain a vector of Colour instead of raw char data. --- plugingui/pixelbuffer.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugingui/pixelbuffer.cc') diff --git a/plugingui/pixelbuffer.cc b/plugingui/pixelbuffer.cc index f2fdf62..906e4d6 100644 --- a/plugingui/pixelbuffer.cc +++ b/plugingui/pixelbuffer.cc @@ -142,9 +142,10 @@ void PixelBufferAlpha::addPixel(size_t x, size_t y, buf[PX(3)] = (a + b) * 255; } -void PixelBufferAlpha::addPixel(size_t x, size_t y, Colour c) +void PixelBufferAlpha::addPixel(size_t x, size_t y, const Colour& c) { - addPixel(x, y, c.red * 255, c.green * 255, c.blue * 255, c.alpha * 255); + addPixel(x, y, + c.red() * 255, c.green() * 255, c.blue() * 255, c.alpha() * 255); } void PixelBufferAlpha::pixel(size_t x, size_t y, -- cgit v1.2.3