summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/render/modernopenglgraphics.cpp1
-rw-r--r--src/test/testlauncher.cpp11
2 files changed, 12 insertions, 0 deletions
diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp
index ea8447c33..12a07b191 100644
--- a/src/render/modernopenglgraphics.cpp
+++ b/src/render/modernopenglgraphics.cpp
@@ -1190,6 +1190,7 @@ void ModernOpenGLGraphics::calcImageRect(ImageVertexes *const vert,
const int w, const int h,
const ImageRect &imgRect)
{
+ #include "render/graphics_calcImageRect.hpp"
}
void ModernOpenGLGraphics::clearScreen() const
diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp
index d3bb5d571..7072e292d 100644
--- a/src/test/testlauncher.cpp
+++ b/src/test/testlauncher.cpp
@@ -27,6 +27,7 @@
#include "settings.h"
#include "soundmanager.h"
+#include "gui/skin.h"
#include "gui/theme.h"
#include "gui/fonts/font.h"
@@ -375,8 +376,10 @@ int TestLauncher::testDraw()
img[1] = Theme::getImageFromTheme("graphics/sprites/arrow_right.png");
img[2] = Theme::getImageFromTheme("graphics/sprites/arrow_up.png");
ImageCollection *const col = new ImageCollection;
+ ImageCollection *const col2 = new ImageCollection;
ImageVertexes *const vert = new ImageVertexes;
vert->image = img[2];
+ Skin *skin = theme->load("button.xml", "button.xml");
mainGraphics->pushClipArea(Rect(10, 20, 790, 580));
mainGraphics->setColor(Color(0xFFU, 0xFFU, 0x00U, 0xFFU));
@@ -387,6 +390,12 @@ int TestLauncher::testDraw()
mainGraphics->drawImage(img[0], 190, 383);
img[0]->setAlpha(1.0f);
+ mainGraphics->calcWindow(col2,
+ 5, 40,
+ 500, 40,
+ skin->getBorder());
+ mainGraphics->finalize(col2);
+
mainGraphics->calcTileVertexes(vert, img[2], 10, 10);
mainGraphics->calcTileVertexes(vert, img[2], 40, 10);
mainGraphics->finalize(vert);
@@ -400,6 +409,8 @@ int TestLauncher::testDraw()
boldFont->drawString(mainGraphics,
"test test test test test test test test ", 300, 100);
+ mainGraphics->drawTileCollection(col2);
+
mainGraphics->drawPattern(img[0], 10, 400, 300, 180);
mainGraphics->calcPattern(col, img[1], 500, 400, 150, 100);