aboutsummaryrefslogtreecommitdiff
path: root/graphics/VectorRenderer.h
diff options
context:
space:
mode:
authorNarek Mailian2013-07-01 21:55:09 +0000
committerNarek Mailian2013-08-16 20:54:08 +0200
commit5c00dbbd2ac3d39e4ef801f3b50c3bb057422072 (patch)
treef54c2d3c91066efdfe26a00c1a4e078b2872c0e9 /graphics/VectorRenderer.h
parent887a99e211c25fd16e4cf3b7505ae17678c2f997 (diff)
downloadscummvm-rg350-5c00dbbd2ac3d39e4ef801f3b50c3bb057422072.tar.gz
scummvm-rg350-5c00dbbd2ac3d39e4ef801f3b50c3bb057422072.tar.bz2
scummvm-rg350-5c00dbbd2ac3d39e4ef801f3b50c3bb057422072.zip
GRAPHICS: Add support for Soft Shadows with rounded squares
Diffstat (limited to 'graphics/VectorRenderer.h')
-rw-r--r--graphics/VectorRenderer.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h
index 4ca76224e1..8e1c5e91e1 100644
--- a/graphics/VectorRenderer.h
+++ b/graphics/VectorRenderer.h
@@ -73,6 +73,8 @@ struct DrawStep {
uint8 shadow, stroke, factor, radius, bevel; /**< Misc options... */
uint8 fillMode; /**< active fill mode */
+ uint8 shadowFillMode; /**< fill mode of the shadow used */
+
uint32 extraData; /**< Generic parameter for extra options (orientation/bevel) */
uint32 scale; /**< scale of all the coordinates in FIXED POINT with 16 bits mantissa */
@@ -103,7 +105,7 @@ VectorRenderer *createRenderer(int mode);
*/
class VectorRenderer {
public:
- VectorRenderer() : _activeSurface(NULL), _fillMode(kFillDisabled), _shadowOffset(0),
+ VectorRenderer() : _activeSurface(NULL), _fillMode(kFillDisabled), _shadowOffset(0), _shadowFillMode(kShadowExponential),
_disableShadows(false), _strokeWidth(1), _gradientFactor(1) {
}
@@ -126,6 +128,11 @@ public:
kTriangleRight
};
+ enum ShadowFillMode {
+ kShadowLinear = 0,
+ kShadowExponential = 1
+ };
+
/**
* Draws a line by considering the special cases for optimization.
*
@@ -292,6 +299,10 @@ public:
_fillMode = mode;
}
+ virtual void setShadowFillMode(ShadowFillMode mode) {
+ _shadowFillMode = mode;
+ }
+
/**
* Sets the stroke width. All shapes drawn with a stroke will
* have that width. Pass 0 to disable shape stroking.
@@ -485,6 +496,7 @@ protected:
Surface *_activeSurface; /**< Pointer to the surface currently being drawn */
FillMode _fillMode; /**< Defines in which way (if any) are filled the drawn shapes */
+ ShadowFillMode _shadowFillMode;
int _shadowOffset; /**< offset for drawn shadows */
int _bevel; /**< amount of fake bevel */