From c18090169d6bb49e877956701e77e8af338ed675 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 9 Nov 2015 21:26:57 +0100 Subject: Refactor PixelBuffer, and remove unnecessary calls to setPixel and addPixel. --- plugingui/painter.h | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'plugingui/painter.h') diff --git a/plugingui/painter.h b/plugingui/painter.h index 40747a7..009ebde 100644 --- a/plugingui/painter.h +++ b/plugingui/painter.h @@ -58,32 +58,28 @@ public: int width, int height); typedef struct { - Image *topLeft; - Image *top; - Image *topRight; - Image *left; - Image *right; - Image *bottomLeft; - Image *bottom; - Image *bottomRight; - Image *center; + Image* topLeft; + Image* top; + Image* topRight; + Image* left; + Image* right; + Image* bottomLeft; + Image* bottom; + Image* bottomRight; + Image* center; } Box; void drawBox(int x, int y, const Box& box, int width, int height); typedef struct { - Image *left; - Image *right; - Image *center; + Image* left; + Image* right; + Image* center; } Bar; void drawBar(int x, int y, const Bar& bar, int width, int height); void clear(); private: - void plot(int x, int y, double c); - double fpart(double x); - double rfpart(double x); - Widget& widget; PixelBufferAlpha* pixbuf; Colour colour; -- cgit v1.2.3