aboutsummaryrefslogtreecommitdiff
path: root/graphics/VectorRendererSpec.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2014-05-05 00:52:56 +0300
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commit4474ccf8144563c4bacbb060c943c0f68e317cea (patch)
treea3e31d55b72be1a0717db5ba3c97020631f0f50f /graphics/VectorRendererSpec.cpp
parentf0c52096f3e9215cb584b3862f2cd4b9632761d5 (diff)
downloadscummvm-rg350-4474ccf8144563c4bacbb060c943c0f68e317cea.tar.gz
scummvm-rg350-4474ccf8144563c4bacbb060c943c0f68e317cea.tar.bz2
scummvm-rg350-4474ccf8144563c4bacbb060c943c0f68e317cea.zip
GUI: Implemented alphabitmap autoscale
Diffstat (limited to 'graphics/VectorRendererSpec.cpp')
-rw-r--r--graphics/VectorRendererSpec.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index e87397b349..1fdd0fc4eb 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -886,6 +886,17 @@ blitKeyBitmap(const Graphics::Surface *source, const Common::Rect &r) {
template<typename PixelType>
void VectorRendererSpec<PixelType>::
+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<typename PixelType>
+void VectorRendererSpec<PixelType>::
blitKeyBitmapClip(const Graphics::Surface *source, const Common::Rect &r, const Common::Rect &clipping) {
if (clipping.isEmpty() || clipping.contains(r)) {
blitKeyBitmap(source, r);
@@ -945,12 +956,6 @@ blitKeyBitmapClip(const Graphics::Surface *source, const Common::Rect &r, const
template<typename PixelType>
void VectorRendererSpec<PixelType>::
-blitAlphaBitmap(Graphics::TransparentSurface *source, const Common::Rect &r) {
- source->blit(*_activeSurface, r.left, r.top);
-}
-
-template<typename PixelType>
-void VectorRendererSpec<PixelType>::
applyScreenShading(GUI::ThemeEngine::ShadingStyle shadingStyle) {
int pixels = _activeSurface->w * _activeSurface->h;
PixelType *ptr = (PixelType *)_activeSurface->getPixels();