From 9d3eb2ebd7311a4ed3c69b7bc4637dee6dbfe530 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 9 Dec 2011 13:27:49 +0000 Subject: GUI: Refactor gradient calculation into separate method --- graphics/VectorRendererSpec.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'graphics/VectorRendererSpec.h') diff --git a/graphics/VectorRendererSpec.h b/graphics/VectorRendererSpec.h index b0a0624aee..fe64f9774d 100644 --- a/graphics/VectorRendererSpec.h +++ b/graphics/VectorRendererSpec.h @@ -185,6 +185,9 @@ protected: */ inline PixelType calcGradient(uint32 pos, uint32 max); + void precalcGradient(int h); + void gradientFill(PixelType *first, int width, int x, int y); + /** * Fills several pixels in a row with a given color and the specified alpha blending. * @@ -210,6 +213,9 @@ protected: int _gradientBytes[3]; /**< Color bytes of the active gradient, used to speed up calculation */ + Common::Array _gradCache; + Common::Array _gradIndexes; + PixelType _bevelColor; PixelType _bitmapAlphaColor; }; -- cgit v1.2.3