From 114c65a1987b4d5064089c5b42ccafaa391d36eb Mon Sep 17 00:00:00 2001 From: rachytski Date: Sat, 8 Jan 2011 23:35:22 +0200 Subject: [PATCH] Text filtering test. --- yg/yg_tests/screengl_test.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/yg/yg_tests/screengl_test.cpp b/yg/yg_tests/screengl_test.cpp index e60a40d2f0..2ff10cf88a 100644 --- a/yg/yg_tests/screengl_test.cpp +++ b/yg/yg_tests/screengl_test.cpp @@ -545,6 +545,23 @@ namespace } }; + struct TestDrawFontFiltering + { + void DoDraw(shared_ptr p) + { + int startSize = 20; + int sizesCount = 20; + + int startY = 30; + for (size_t i = 0; i < sizesCount; ++i) + { + p->drawText(m2::PointD(10, startY), 0, startSize + i, "Simplicity is the ultimate sophistication. Leonardo Da Vinci", 0); + p->drawText(m2::PointD(10, startY + (startSize + i) / 2), 0, startSize + i, "This text should be filtered", 0); + startY += startSize + i; + } + } + }; + struct TestDrawUtilsRect { void DoDraw(shared_ptr p) @@ -722,7 +739,8 @@ namespace // UNIT_TEST_GL(TestDrawStringOnString); // UNIT_TEST_GL(TestDrawFontOnPath); // UNIT_TEST_GL(TestDrawFontOnPathWithOffset); - UNIT_TEST_GL(TestDrawFontOverflow); +// UNIT_TEST_GL(TestDrawFontOverflow); + UNIT_TEST_GL(TestDrawFontFiltering); // UNIT_TEST_GL(TestDrawSGIConvex); // UNIT_TEST_GL(TestDrawPoly); // UNIT_TEST_GL(TestDrawSolidRect);