[DEV] add simple text test

This commit is contained in:
Edouard DUPIN 2014-01-09 21:52:11 +01:00
parent f6a84299f7
commit 6b4807666c
2 changed files with 18 additions and 3 deletions

View File

@ -71,6 +71,8 @@ void TestDistanceField::calculateMinMaxSize(void) {
void TestDistanceField::onDraw(void) { void TestDistanceField::onDraw(void) {
//m_text1.draw();
m_text2.draw();
if (m_coord.size() <= 0) { if (m_coord.size() <= 0) {
APPL_WARNING("Nothink to draw..."); APPL_WARNING("Nothink to draw...");
return; return;
@ -100,6 +102,7 @@ void TestDistanceField::onDraw(void) {
// Request the draw od the elements : // Request the draw od the elements :
ewol::openGL::drawArrays(GL_TRIANGLES, 0, m_coord.size()); ewol::openGL::drawArrays(GL_TRIANGLES, 0, m_coord.size());
m_GLprogram->unUse(); m_GLprogram->unUse();
} }
@ -110,8 +113,17 @@ void TestDistanceField::onRegenerateDisplay(void) {
} }
clear(); clear();
APPL_WARNING("Regenerate..."); APPL_WARNING("Regenerate...");
setPos(vec3(-200,-500,0)); //setPos(vec3(-200,-500,0));
print(ivec2(2048,2048)); //print(ivec2(2048,2048));
/*
m_text1.reset();
m_text1.setPos(vec3(50,50,0));
m_text1.printDecorated("exemple Text 1");
*/
m_text2.reset();
m_text2.setPos(vec3(100,100,0));
m_text2.printDecorated("exemple Text 2");
} }

View File

@ -11,11 +11,14 @@
#include <appl/debug.h> #include <appl/debug.h>
#include <ewol/widget/Widget.h> #include <ewol/widget/Widget.h>
#include <ewol/compositing/Compositing.h> #include <ewol/compositing/Text.h>
#include <ewol/compositing/TextDF.h>
#include <ewol/resource/Program.h> #include <ewol/resource/Program.h>
#include <ewol/resource/DistanceFieldFont.h> #include <ewol/resource/DistanceFieldFont.h>
class TestDistanceField : public ewol::Widget { class TestDistanceField : public ewol::Widget {
ewol::compositing::Text m_text1;
ewol::compositing::TextDF m_text2;
public: public:
// Constructeur // Constructeur
TestDistanceField(void); TestDistanceField(void);