diff options
| author | Eugene Sandulenko | 2014-08-04 01:12:49 +0200 |
|---|---|---|
| committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
| commit | 6524a8d103c87def348b9560418850cb48d24ce4 (patch) | |
| tree | 7c8a3529295876c2c58f55c960d9b015210d441c /graphics | |
| parent | 8c7a8116be3f54e03644876c8d41daf1bf2e835a (diff) | |
| download | scummvm-rg350-6524a8d103c87def348b9560418850cb48d24ce4.tar.gz scummvm-rg350-6524a8d103c87def348b9560418850cb48d24ce4.tar.bz2 scummvm-rg350-6524a8d103c87def348b9560418850cb48d24ce4.zip | |
GUI: Added transparency to PicWidgets
Diffstat (limited to 'graphics')
| -rw-r--r-- | graphics/VectorRenderer.h | 3 | ||||
| -rw-r--r-- | graphics/VectorRendererSpec.cpp | 8 | ||||
| -rw-r--r-- | graphics/VectorRendererSpec.h | 3 |
3 files changed, 8 insertions, 6 deletions
diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h index 2c32761ed4..5f7b6e60d3 100644 --- a/graphics/VectorRenderer.h +++ b/graphics/VectorRenderer.h @@ -498,7 +498,8 @@ public: virtual void blitAlphaBitmap(Graphics::TransparentSurface *source, const Common::Rect &r, GUI::ThemeEngine::AutoScaleMode autoscale = GUI::ThemeEngine::kAutoScaleNone, Graphics::DrawStep::VectorAlignment xAlign = Graphics::DrawStep::kVectorAlignManual, - Graphics::DrawStep::VectorAlignment yAlign = Graphics::DrawStep::kVectorAlignManual) = 0; + Graphics::DrawStep::VectorAlignment yAlign = Graphics::DrawStep::kVectorAlignManual, + int alpha = 255) = 0; /** * Draws a string into the screen. Wrapper for the Graphics::Font string drawing diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index 8af6594fd4..9aed3301fa 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -888,11 +888,11 @@ blitKeyBitmap(const Graphics::Surface *source, const Common::Rect &r) { template<typename PixelType> void VectorRendererSpec<PixelType>:: blitAlphaBitmap(Graphics::TransparentSurface *source, const Common::Rect &r, GUI::ThemeEngine::AutoScaleMode autoscale, - Graphics::DrawStep::VectorAlignment xAlign, Graphics::DrawStep::VectorAlignment yAlign) { + Graphics::DrawStep::VectorAlignment xAlign, Graphics::DrawStep::VectorAlignment yAlign, int alpha) { if (autoscale == GUI::ThemeEngine::kAutoScaleStretch) { source->blit(*_activeSurface, r.left, r.top, Graphics::FLIP_NONE, - nullptr, TS_ARGB(255, 255, 255, 255), - r.width(), r.height()); + nullptr, TS_ARGB(alpha, 255, 255, 255), + r.width(), r.height()); } else if (autoscale == GUI::ThemeEngine::kAutoScaleFit) { double ratio = (double)r.width() / source->w; double ratio2 = (double)r.height() / source->h; @@ -908,7 +908,7 @@ blitAlphaBitmap(Graphics::TransparentSurface *source, const Common::Rect &r, GUI offy = (r.height() - (int)(source->h * ratio)) >> 1; source->blit(*_activeSurface, r.left + offx, r.top + offy, Graphics::FLIP_NONE, - nullptr, TS_ARGB(255, 255, 255, 255), + nullptr, TS_ARGB(alpha, 255, 255, 255), (int)(source->w * ratio), (int)(source->h * ratio)); } else if (autoscale == GUI::ThemeEngine::kAutoScaleNinePatch) { diff --git a/graphics/VectorRendererSpec.h b/graphics/VectorRendererSpec.h index b681d7e30e..84c802f6df 100644 --- a/graphics/VectorRendererSpec.h +++ b/graphics/VectorRendererSpec.h @@ -98,7 +98,8 @@ public: void blitAlphaBitmap(Graphics::TransparentSurface *source, const Common::Rect &r, GUI::ThemeEngine::AutoScaleMode autoscale = GUI::ThemeEngine::kAutoScaleNone, Graphics::DrawStep::VectorAlignment xAlign = Graphics::DrawStep::kVectorAlignManual, - Graphics::DrawStep::VectorAlignment yAlign = Graphics::DrawStep::kVectorAlignManual); + Graphics::DrawStep::VectorAlignment yAlign = Graphics::DrawStep::kVectorAlignManual, + int alpha = 255); void applyScreenShading(GUI::ThemeEngine::ShadingStyle shadingStyle); |
