From 4474ccf8144563c4bacbb060c943c0f68e317cea Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 5 May 2014 00:52:56 +0300 Subject: GUI: Implemented alphabitmap autoscale --- graphics/VectorRendererSpec.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'graphics/VectorRendererSpec.cpp') diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index e87397b349..1fdd0fc4eb 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -884,6 +884,17 @@ blitKeyBitmap(const Graphics::Surface *source, const Common::Rect &r) { } } +template +void VectorRendererSpec:: +blitAlphaBitmap(Graphics::TransparentSurface *source, const Common::Rect &r, bool autoscale) { + if (autoscale) + source->blit(*_activeSurface, r.left, r.top, Graphics::FLIP_NONE, + nullptr, TS_ARGB(255, 255, 255, 255), + r.width(), r.height()); + else + source->blit(*_activeSurface, r.left, r.top); +} + template void VectorRendererSpec:: blitKeyBitmapClip(const Graphics::Surface *source, const Common::Rect &r, const Common::Rect &clipping) { @@ -943,12 +954,6 @@ blitKeyBitmapClip(const Graphics::Surface *source, const Common::Rect &r, const } } -template -void VectorRendererSpec:: -blitAlphaBitmap(Graphics::TransparentSurface *source, const Common::Rect &r) { - source->blit(*_activeSurface, r.left, r.top); -} - template void VectorRendererSpec:: applyScreenShading(GUI::ThemeEngine::ShadingStyle shadingStyle) { -- cgit v1.2.3