Set the distance field test in compilation flags
This commit is contained in:
@@ -69,7 +69,7 @@ void CodeView::Init(void)
|
||||
SetLimitScrolling(0.2);
|
||||
}
|
||||
|
||||
#ifdef __VIDEO__OPENGL_ES_2
|
||||
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||
CodeView::CodeView(etk::UString fontName, int32_t fontSize) :
|
||||
m_OObjectText(fontName, fontSize)
|
||||
{
|
||||
@@ -118,7 +118,7 @@ bool CodeView::CalculateMinSize(void)
|
||||
void CodeView::CalculateMaxSize(void)
|
||||
{
|
||||
m_maxSize.x = 2048;
|
||||
#ifdef __VIDEO__OPENGL_ES_2
|
||||
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||
int32_t letterHeight = m_OObjectText.GetHeight();
|
||||
#else
|
||||
int32_t letterHeight = m_OObjectTextNormal.GetHeight();
|
||||
@@ -130,7 +130,7 @@ void CodeView::CalculateMaxSize(void)
|
||||
void CodeView::OnDraw(ewol::DrawProperty& displayProp)
|
||||
{
|
||||
m_OObjectsColored.Draw();
|
||||
#ifdef __VIDEO__OPENGL_ES_2
|
||||
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||
m_OObjectText.Draw();
|
||||
#else
|
||||
m_OObjectTextNormal.Draw();
|
||||
@@ -149,7 +149,7 @@ void CodeView::OnRegenerateDisplay(void)
|
||||
// For the scrooling windows
|
||||
CalculateMaxSize();
|
||||
|
||||
#ifdef __VIDEO__OPENGL_ES_2
|
||||
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||
m_OObjectText.Clear();
|
||||
#else
|
||||
m_OObjectTextNormal.Clear();
|
||||
@@ -169,7 +169,7 @@ void CodeView::OnRegenerateDisplay(void)
|
||||
} // else : nothing to do ...
|
||||
|
||||
// generate the objects :
|
||||
#ifdef __VIDEO__OPENGL_ES_2
|
||||
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||
BufferManager::Get(m_bufferID)->Display(m_OObjectText,
|
||||
m_OObjectsColored,
|
||||
m_originScrooled.x, m_originScrooled.y, m_size.x, m_size.y);
|
||||
@@ -435,7 +435,7 @@ void CodeView::OnLostFocus(void)
|
||||
|
||||
void CodeView::SetFontSize(int32_t size)
|
||||
{
|
||||
#ifdef __VIDEO__OPENGL_ES_2
|
||||
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||
m_OObjectText.SetSize(size);
|
||||
#else
|
||||
m_OObjectTextNormal.SetSize(size);
|
||||
@@ -446,12 +446,11 @@ void CodeView::SetFontSize(int32_t size)
|
||||
SetScrollingSize(size*3.0*1.46); // 1.46 is a magic nmber ...
|
||||
}
|
||||
|
||||
#ifdef __VIDEO__OPENGL_ES_2
|
||||
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||
void CodeView::SetFontName(etk::UString fontName)
|
||||
{
|
||||
m_OObjectText.SetFont(fontName);
|
||||
}
|
||||
|
||||
#else
|
||||
void CodeView::SetFontNameNormal(etk::UString fontName)
|
||||
{
|
||||
|
@@ -39,7 +39,7 @@ class CodeView :public ewol::WidgetScrooled
|
||||
{
|
||||
public:
|
||||
void Init(void);
|
||||
#ifdef __VIDEO__OPENGL_ES_2
|
||||
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||
CodeView(etk::UString fontName, int32_t fontSize);
|
||||
#endif
|
||||
CodeView(void);
|
||||
@@ -61,7 +61,7 @@ class CodeView :public ewol::WidgetScrooled
|
||||
etk::Vector<Vector2D<float> > m_lineNumberList;
|
||||
void UpdateNumberOfLineReference(int32_t bufferID);
|
||||
// drawing elements :
|
||||
#ifdef __VIDEO__OPENGL_ES_2
|
||||
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||
ewol::TEXT_DISPLAY_TYPE m_OObjectText;
|
||||
#else
|
||||
ewol::TEXT_DISPLAY_TYPE m_OObjectTextNormal;
|
||||
@@ -106,7 +106,7 @@ class CodeView :public ewol::WidgetScrooled
|
||||
virtual void OnLostFocus(void);
|
||||
public:
|
||||
void SetFontSize(int32_t size);
|
||||
#ifdef __VIDEO__OPENGL_ES_2
|
||||
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||
void SetFontName(etk::UString fontName);
|
||||
#else
|
||||
void SetFontNameNormal(etk::UString fontName);
|
||||
|
@@ -154,7 +154,7 @@ MainWindows::MainWindows(void)
|
||||
mySizerHori->SubWidgetAdd(mySizerVert2);
|
||||
|
||||
// main buffer Area :
|
||||
#ifdef __VIDEO__OPENGL_ES_2
|
||||
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||
myCodeView = new CodeView("Font/freefont/FreeMono.ttf", 24);
|
||||
#else
|
||||
myCodeView = new CodeView();
|
||||
@@ -163,7 +163,7 @@ MainWindows::MainWindows(void)
|
||||
myCodeView->SetExpendY(true);
|
||||
myCodeView->SetFillX(true);
|
||||
myCodeView->SetFillY(true);
|
||||
#ifndef __VIDEO__OPENGL_ES_2
|
||||
#ifndef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||
myCodeView->SetFontSize(11);
|
||||
myCodeView->SetFontNameNormal( "Font/freefont/FreeMono.ttf");
|
||||
myCodeView->SetFontNameBold( "Font/freefont/FreeMonoBold.ttf");
|
||||
@@ -175,6 +175,7 @@ MainWindows::MainWindows(void)
|
||||
// search area :
|
||||
Search * mySearch = new Search();
|
||||
mySizerVert2->SubWidgetAdd(mySearch);
|
||||
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||
{
|
||||
ewol::SizerHori * mySizerHori2 = new ewol::SizerHori();
|
||||
mySizerVert2->SubWidgetAdd(mySizerHori2);
|
||||
@@ -201,6 +202,7 @@ MainWindows::MainWindows(void)
|
||||
tmpSlider->SetValue(0550);
|
||||
tmpSliderMax = tmpSlider;
|
||||
}
|
||||
#endif
|
||||
|
||||
mySizerHori = new ewol::SizerHori();
|
||||
mySizerVert->SubWidgetAdd(mySizerHori);
|
||||
|
Reference in New Issue
Block a user