diff options
author | Paul Gilbert | 2013-11-30 20:44:23 -0500 |
---|---|---|
committer | Paul Gilbert | 2013-11-30 20:44:23 -0500 |
commit | ede418b67a0f14e4f17a2b03f5362741badd5532 (patch) | |
tree | 07de039fac5c303f1b9fce372afe5fa19854f547 /graphics/VectorRenderer.h | |
parent | 66d1f7a8de2ff5a21ad013f45924c406f4833e9a (diff) | |
parent | 3e859768770a0b385e21c4528cd546b33ed9a55d (diff) | |
download | scummvm-rg350-ede418b67a0f14e4f17a2b03f5362741badd5532.tar.gz scummvm-rg350-ede418b67a0f14e4f17a2b03f5362741badd5532.tar.bz2 scummvm-rg350-ede418b67a0f14e4f17a2b03f5362741badd5532.zip |
VOYEUR: Merge of upstream
Diffstat (limited to 'graphics/VectorRenderer.h')
-rw-r--r-- | graphics/VectorRenderer.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h index 0467cac946..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. * @@ -278,7 +285,7 @@ public: * Clears the active surface. */ virtual void clearSurface() { - byte *src = (byte *)_activeSurface->pixels; + byte *src = (byte *)_activeSurface->getPixels(); memset(src, 0, _activeSurface->pitch * _activeSurface->h); } @@ -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. @@ -466,7 +477,7 @@ public: */ virtual void drawString(const Graphics::Font *font, const Common::String &text, const Common::Rect &area, Graphics::TextAlign alignH, - GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool useEllipsis) = 0; + GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool useEllipsis, const Common::Rect &textDrawableArea) = 0; /** * Allows to temporarily enable/disable all shadows drawing. @@ -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 */ |