aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/VectorRenderer.h3
-rw-r--r--graphics/VectorRendererSpec.cpp4
2 files changed, 6 insertions, 1 deletions
diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h
index fb19fa3156..0a83dc5d49 100644
--- a/graphics/VectorRenderer.h
+++ b/graphics/VectorRenderer.h
@@ -71,7 +71,8 @@ struct DrawStep {
enum AutoScaleMode {
kAutoScaleNone = 0,
kAutoScaleStretch = 1,
- kAutoScaleFit = 2
+ kAutoScaleFit = 2,
+ kAutoScaleNinePatch = 3
};
VectorAlignment xAlign;
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index 68b77d20ee..f3e496af70 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -26,6 +26,7 @@
#include "graphics/surface.h"
#include "graphics/transparent_surface.h"
+#include "graphics/nine_patch.h"
#include "graphics/colormasks.h"
#include "gui/ThemeEngine.h"
@@ -902,6 +903,9 @@ blitAlphaBitmap(Graphics::TransparentSurface *source, const Common::Rect &r, Gra
nullptr, TS_ARGB(255, 255, 255, 255),
(int)(source->w * ratio), (int)(source->h * ratio));
+ } else if (autoscale == Graphics::DrawStep::kAutoScaleNinePatch) {
+ Graphics::NinePatchBitmap nine(source, false);
+ nine.blit(*_activeSurface, r.left, r.top, r.width(), r.height());
} else {
source->blit(*_activeSurface, r.left, r.top);
}