aboutsummaryrefslogtreecommitdiff
path: root/graphics/VectorRendererSpec.h
diff options
context:
space:
mode:
authorEugene Sandulenko2011-12-09 13:27:49 +0000
committerEugene Sandulenko2011-12-10 11:51:10 +0000
commit9d3eb2ebd7311a4ed3c69b7bc4637dee6dbfe530 (patch)
treee63889ec3bc2ff77030b4cd548545710a24f7d86 /graphics/VectorRendererSpec.h
parent1dbc41d411fbd99b3d363710b2060708d3e097db (diff)
downloadscummvm-rg350-9d3eb2ebd7311a4ed3c69b7bc4637dee6dbfe530.tar.gz
scummvm-rg350-9d3eb2ebd7311a4ed3c69b7bc4637dee6dbfe530.tar.bz2
scummvm-rg350-9d3eb2ebd7311a4ed3c69b7bc4637dee6dbfe530.zip
GUI: Refactor gradient calculation into separate method
Diffstat (limited to 'graphics/VectorRendererSpec.h')
-rw-r--r--graphics/VectorRendererSpec.h6
1 files changed, 6 insertions, 0 deletions
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<PixelType> _gradCache;
+ Common::Array<int> _gradIndexes;
+
PixelType _bevelColor;
PixelType _bitmapAlphaColor;
};