First test of the distance field methode for the font
This commit is contained in:
parent
9587e21498
commit
6ed410d936
@ -41,6 +41,8 @@ typedef struct{
|
||||
uint32_t diplayableLine; //!< NB Line that can be displayed
|
||||
}infoStatBuffer_ts;
|
||||
|
||||
//#define TEXT_DISPLAY_TYPE OObject2DTextColored
|
||||
#define TEXT_DISPLAY_TYPE OObject2DTextShader
|
||||
|
||||
class Buffer {
|
||||
public:
|
||||
@ -81,10 +83,10 @@ class Buffer {
|
||||
virtual void GetInfo(infoStatBuffer_ts &infoToUpdate) {};
|
||||
virtual void SetLineDisplay(uint32_t lineNumber) {};
|
||||
|
||||
virtual int32_t Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
ewol::OObject2DTextColored& OOTextBold,
|
||||
ewol::OObject2DTextColored& OOTextItalic,
|
||||
ewol::OObject2DTextColored& OOTextBoldItalic,
|
||||
virtual int32_t Display(ewol::TEXT_DISPLAY_TYPE& OOTextNormal,
|
||||
ewol::TEXT_DISPLAY_TYPE& OOTextBold,
|
||||
ewol::TEXT_DISPLAY_TYPE& OOTextItalic,
|
||||
ewol::TEXT_DISPLAY_TYPE& OOTextBoldItalic,
|
||||
ewol::OObject2DColored& OOColored, int32_t offsetX, int32_t offsetY, int32_t sizeX, int32_t sizeY)
|
||||
{
|
||||
return ERR_NONE;
|
||||
|
@ -67,10 +67,10 @@ BufferEmpty::~BufferEmpty(void)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
int32_t BufferEmpty::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
ewol::OObject2DTextColored& OOTextBold,
|
||||
ewol::OObject2DTextColored& OOTextItalic,
|
||||
ewol::OObject2DTextColored& OOTextBoldItalic,
|
||||
int32_t BufferEmpty::Display(ewol::TEXT_DISPLAY_TYPE& OOTextNormal,
|
||||
ewol::TEXT_DISPLAY_TYPE& OOTextBold,
|
||||
ewol::TEXT_DISPLAY_TYPE& OOTextItalic,
|
||||
ewol::TEXT_DISPLAY_TYPE& OOTextBoldItalic,
|
||||
ewol::OObject2DColored& OOColored, int32_t offsetX, int32_t offsetY, int32_t sizeX, int32_t sizeY)
|
||||
{
|
||||
// Get color :
|
||||
|
@ -32,10 +32,10 @@ class BufferEmpty : public Buffer {
|
||||
public:
|
||||
BufferEmpty(void);
|
||||
virtual ~BufferEmpty(void);
|
||||
int32_t Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
ewol::OObject2DTextColored& OOTextBold,
|
||||
ewol::OObject2DTextColored& OOTextItalic,
|
||||
ewol::OObject2DTextColored& OOTextBoldItalic,
|
||||
int32_t Display(ewol::TEXT_DISPLAY_TYPE& OOTextNormal,
|
||||
ewol::TEXT_DISPLAY_TYPE& OOTextBold,
|
||||
ewol::TEXT_DISPLAY_TYPE& OOTextItalic,
|
||||
ewol::TEXT_DISPLAY_TYPE& OOTextBoldItalic,
|
||||
ewol::OObject2DColored& OOColored, int32_t offsetX, int32_t offsetY, int32_t sizeX, int32_t sizeY);
|
||||
|
||||
};
|
||||
|
@ -206,7 +206,7 @@ void BufferText::SetLineDisplay(uint32_t lineNumber)
|
||||
|
||||
#define SEPARATION_SIZE_LINE_NUMBER (3)
|
||||
|
||||
void BufferText::DrawLineNumber(ewol::OObject2DTextColored* OOText, ewol::OObject2DColored* OOColored, int32_t sizeX, int32_t sizeY, int32_t nbColomn, int32_t lineNumber, int32_t positionY)
|
||||
void BufferText::DrawLineNumber(ewol::TEXT_DISPLAY_TYPE* OOText, ewol::OObject2DColored* OOColored, int32_t sizeX, int32_t sizeY, int32_t nbColomn, int32_t lineNumber, int32_t positionY)
|
||||
{
|
||||
char tmpLineNumber[50];
|
||||
sprintf(tmpLineNumber, "%*d", nbColomn, lineNumber);
|
||||
@ -277,10 +277,10 @@ int32_t BufferText::GetNumberOfLine(void)
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
int32_t BufferText::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
ewol::OObject2DTextColored& OOTextBold,
|
||||
ewol::OObject2DTextColored& OOTextItalic,
|
||||
ewol::OObject2DTextColored& OOTextBoldItalic,
|
||||
int32_t BufferText::Display(ewol::TEXT_DISPLAY_TYPE& OOTextNormal,
|
||||
ewol::TEXT_DISPLAY_TYPE& OOTextBold,
|
||||
ewol::TEXT_DISPLAY_TYPE& OOTextItalic,
|
||||
ewol::TEXT_DISPLAY_TYPE& OOTextBoldItalic,
|
||||
ewol::OObject2DColored& OOColored,
|
||||
int32_t offsetX, int32_t offsetY,
|
||||
int32_t sizeX, int32_t sizeY)
|
||||
@ -319,7 +319,7 @@ int32_t BufferText::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
draw::Color & myColorSpace = ColorizeManager::Get(COLOR_CODE_SPACE);
|
||||
draw::Color & myColorTab = ColorizeManager::Get(COLOR_CODE_TAB);
|
||||
Colorize * selectColor = NULL;
|
||||
ewol::OObject2DTextColored* OOTextSelected = NULL;
|
||||
ewol::TEXT_DISPLAY_TYPE* OOTextSelected = NULL;
|
||||
|
||||
int mylen = m_EdnBuf.Size();
|
||||
int32_t x_base=nbColoneForLineNumber*letterWidth;
|
||||
|
@ -55,10 +55,10 @@ class BufferText : public Buffer {
|
||||
void GetInfo(infoStatBuffer_ts &infoToUpdate);
|
||||
void SetLineDisplay(uint32_t lineNumber);
|
||||
|
||||
int32_t Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
ewol::OObject2DTextColored& OOTextBold,
|
||||
ewol::OObject2DTextColored& OOTextItalic,
|
||||
ewol::OObject2DTextColored& OOTextBoldItalic,
|
||||
int32_t Display(ewol::TEXT_DISPLAY_TYPE& OOTextNormal,
|
||||
ewol::TEXT_DISPLAY_TYPE& OOTextBold,
|
||||
ewol::TEXT_DISPLAY_TYPE& OOTextItalic,
|
||||
ewol::TEXT_DISPLAY_TYPE& OOTextBoldItalic,
|
||||
ewol::OObject2DColored& OOColored,
|
||||
int32_t offsetX, int32_t offsetY,
|
||||
int32_t sizeX, int32_t sizeY);
|
||||
@ -114,7 +114,7 @@ class BufferText : public Buffer {
|
||||
|
||||
int32_t GetMousePosition(Vector2D<float> pos);
|
||||
|
||||
void DrawLineNumber(ewol::OObject2DTextColored* OOText, ewol::OObject2DColored* OOColored, int32_t sizeX, int32_t sizeY, int32_t nbColomn, int32_t lineNumber, int32_t positionY);
|
||||
void DrawLineNumber(ewol::TEXT_DISPLAY_TYPE* OOText, ewol::OObject2DColored* OOColored, int32_t sizeX, int32_t sizeY, int32_t nbColomn, int32_t lineNumber, int32_t positionY);
|
||||
void DrawCursor(ewol::OObject2DColored* OOColored, int32_t x, int32_t y, int32_t letterHeight, int32_t letterWidth, clipping_ts &clip);
|
||||
|
||||
};
|
||||
|
@ -57,10 +57,10 @@ class CodeView :public ewol::WidgetScrooled
|
||||
etk::Vector<Vector2D<float> > m_lineNumberList;
|
||||
void UpdateNumberOfLineReference(int32_t bufferID);
|
||||
// drawing elements :
|
||||
ewol::OObject2DTextColored m_OObjectTextNormal;
|
||||
ewol::OObject2DTextColored m_OObjectTextBold;
|
||||
ewol::OObject2DTextColored m_OObjectTextItalic;
|
||||
ewol::OObject2DTextColored m_OObjectTextBoldItalic;
|
||||
ewol::TEXT_DISPLAY_TYPE m_OObjectTextNormal;
|
||||
ewol::TEXT_DISPLAY_TYPE m_OObjectTextBold;
|
||||
ewol::TEXT_DISPLAY_TYPE m_OObjectTextItalic;
|
||||
ewol::TEXT_DISPLAY_TYPE m_OObjectTextBoldItalic;
|
||||
ewol::OObject2DColored m_OObjectsColored;
|
||||
|
||||
public:
|
||||
|
@ -148,7 +148,7 @@ MainWindows::MainWindows(void)
|
||||
myCodeView->SetExpendY(true);
|
||||
myCodeView->SetFillX(true);
|
||||
myCodeView->SetFillY(true);
|
||||
myCodeView->SetFontSize(11);
|
||||
myCodeView->SetFontSize(48);
|
||||
myCodeView->SetFontNameNormal( "Font/freefont/FreeMono.ttf");
|
||||
myCodeView->SetFontNameBold( "Font/freefont/FreeMonoBold.ttf");
|
||||
myCodeView->SetFontNameItalic( "Font/freefont/FreeMonoOblique.ttf");
|
||||
|
Loading…
x
Reference in New Issue
Block a user