aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/VectorRenderer.h3
-rw-r--r--graphics/VectorRendererSpec.cpp8
-rw-r--r--graphics/VectorRendererSpec.h3
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);