mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-17 19:20:46 +00:00
Verticle fonts less blurry now
This commit is contained in:
parent
3c27f6d4e5
commit
ef4c67fe49
@ -8300,7 +8300,7 @@
|
|||||||
<map>
|
<map>
|
||||||
"tinyxml/tinyxml.h"
|
"tinyxml/tinyxml.h"
|
||||||
|
|
||||||
1308121582 /home/mark/projects/git/sleepyhead/src/graphs/graph.h
|
1308134632 /home/mark/projects/git/sleepyhead/src/graphs/graph.h
|
||||||
"gl_pbuffer.h"
|
"gl_pbuffer.h"
|
||||||
<wx/glcanvas.h>
|
<wx/glcanvas.h>
|
||||||
<wx/geometry.h>
|
<wx/geometry.h>
|
||||||
@ -8309,7 +8309,7 @@
|
|||||||
|
|
||||||
1308026543 D
|
1308026543 D
|
||||||
|
|
||||||
1308133991 /home/mark/projects/git/sleepyhead/src/version.h
|
1308138209 /home/mark/projects/git/sleepyhead/src/version.h
|
||||||
|
|
||||||
1308003040 ent of cb2ab33... Linux wx2.8 & wx2.9 builds fixed
|
1308003040 ent of cb2ab33... Linux wx2.8 & wx2.9 builds fixed
|
||||||
<wx/dcbuffer.h>
|
<wx/dcbuffer.h>
|
||||||
@ -8341,7 +8341,7 @@
|
|||||||
"preferences.h"
|
"preferences.h"
|
||||||
"tinyxml/tinyxml.h"
|
"tinyxml/tinyxml.h"
|
||||||
|
|
||||||
1308122573 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadMain.cpp
|
1308135385 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadMain.cpp
|
||||||
"wx_pch.h"
|
"wx_pch.h"
|
||||||
"version.h"
|
"version.h"
|
||||||
<wx/app.h>
|
<wx/app.h>
|
||||||
@ -8362,7 +8362,7 @@
|
|||||||
"sleeplib/profiles.h"
|
"sleeplib/profiles.h"
|
||||||
"sleeplib/machine_loader.h"
|
"sleeplib/machine_loader.h"
|
||||||
|
|
||||||
1308133983 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp
|
1308135663 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp
|
||||||
"freetype-gl/font-manager.h"
|
"freetype-gl/font-manager.h"
|
||||||
"freetype-gl/texture-font.h"
|
"freetype-gl/texture-font.h"
|
||||||
"graph.h"
|
"graph.h"
|
||||||
|
@ -350,6 +350,7 @@ void SleepyHeadFrame::OnViewMenuDaily( wxCommandEvent& event )
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
main_auinotebook->SetSelection(idx);
|
main_auinotebook->SetSelection(idx);
|
||||||
|
daily->Refresh(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -366,6 +367,11 @@ void SleepyHeadFrame::OnViewMenuSummary( wxCommandEvent& event )
|
|||||||
summary->Refresh();
|
summary->Refresh();
|
||||||
} else {
|
} else {
|
||||||
main_auinotebook->SetSelection(idx);
|
main_auinotebook->SetSelection(idx);
|
||||||
|
summary->Refresh(true);
|
||||||
|
summary->AHI->Refresh(true);
|
||||||
|
summary->USAGE->Refresh(true);
|
||||||
|
summary->LEAK->Refresh(true);
|
||||||
|
summary->PRESSURE->Refresh(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -821,6 +827,7 @@ Daily::Daily(wxWindow *win,Profile *p)
|
|||||||
//Update();
|
//Update();
|
||||||
ResetDate();
|
ResetDate();
|
||||||
}
|
}
|
||||||
|
|
||||||
Daily::~Daily()
|
Daily::~Daily()
|
||||||
{
|
{
|
||||||
if (ahi_bmp) {
|
if (ahi_bmp) {
|
||||||
@ -840,12 +847,12 @@ Daily::~Daily()
|
|||||||
delete teap_bmp;
|
delete teap_bmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->Disconnect(wxEVT_SCROLLWIN_THUMBTRACK, wxScrollWinEventHandler(Daily::OnWinScroll));
|
//this->Disconnect(wxEVT_SCROLLWIN_THUMBTRACK, wxScrollWinEventHandler(Daily::OnWinScroll));
|
||||||
//this->Disconnect(wxEVT_SCROLLWIN_THUMBTRACK, EVT_SCROLLWIN_THUMBTRACK(Daily::OnWinScroll));
|
//this->Disconnect(wxEVT_SCROLLWIN_THUMBTRACK, EVT_SCROLLWIN_THUMBTRACK(Daily::OnWinScroll));
|
||||||
//this->Disconnect(wxEVT_SCROLLWIN_THUMBRELEASE, EVT_SCROLLWIN_THUMBRELEASE(Daily::OnWinScroll));
|
//this->Disconnect(wxEVT_SCROLLWIN_THUMBRELEASE, EVT_SCROLLWIN_THUMBRELEASE(Daily::OnWinScroll));
|
||||||
|
|
||||||
//this->Disconnect(wxID_ANY, wxEVT_REFRESH_DAILY, wxCommandEventHandler(Daily::RefreshData));
|
this->Disconnect(wxID_ANY, wxEVT_REFRESH_DAILY, wxCommandEventHandler(Daily::RefreshData));
|
||||||
//this->Disconnect(wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( Daily::OnEventTreeSelection), NULL, this);
|
this->Disconnect(wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( Daily::OnEventTreeSelection), NULL, this);
|
||||||
}
|
}
|
||||||
void Daily::OnWinScroll(wxScrollWinEvent &event)
|
void Daily::OnWinScroll(wxScrollWinEvent &event)
|
||||||
{
|
{
|
||||||
|
@ -65,13 +65,17 @@ TextMarkup *markup=NULL;
|
|||||||
void GraphInit()
|
void GraphInit()
|
||||||
{
|
{
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
glewInit(); // Dont forget this nasty little sucker.. :)
|
static bool glewinit_called=false;
|
||||||
|
if (!glewinit_called) {
|
||||||
|
glewInit(); // Dont forget this nasty little sucker.. :)
|
||||||
|
glewinit_called=true;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!gfont_init) {
|
if (!gfont_init) {
|
||||||
font_manager=new FontManager();
|
font_manager=new FontManager();
|
||||||
vbuffer=new VertexBuffer((char *)"v3i:t2f:c4f");
|
vbuffer=new VertexBuffer((char *)"v3i:t2f:c4f");
|
||||||
zfont=font_manager->GetFromFilename(pref.Get("{home}{sep}FreeSans.ttf"),14);
|
zfont=font_manager->GetFromFilename(pref.Get("{home}{sep}FreeSans.ttf"),12);
|
||||||
markup=new TextMarkup();
|
markup=new TextMarkup();
|
||||||
|
|
||||||
glBindTexture( GL_TEXTURE_2D, font_manager->m_atlas->m_texid );
|
glBindTexture( GL_TEXTURE_2D, font_manager->m_atlas->m_texid );
|
||||||
@ -102,6 +106,11 @@ void GraphDone()
|
|||||||
delete shared_context;
|
delete shared_context;
|
||||||
shared_context=NULL;
|
shared_context=NULL;
|
||||||
}
|
}
|
||||||
|
if (pbuffer) {
|
||||||
|
delete pbuffer;
|
||||||
|
pbuffer=NULL;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTextExtent(wxString text, float & width, float & height, TextureFont *font=zfont)
|
void GetTextExtent(wxString text, float & width, float & height, TextureFont *font=zfont)
|
||||||
@ -135,7 +144,7 @@ void DrawText2(wxString text, float x, float y,TextureFont *font)
|
|||||||
}
|
}
|
||||||
//glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
//glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
||||||
glEnable( GL_BLEND );
|
glEnable( GL_BLEND );
|
||||||
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
|
//glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
|
||||||
glEnable( GL_TEXTURE_2D );
|
glEnable( GL_TEXTURE_2D );
|
||||||
glColor4f(1,1,1,1);
|
glColor4f(1,1,1,1);
|
||||||
vbuffer->Render(GL_TRIANGLES, (char *)"vtc" );
|
vbuffer->Render(GL_TRIANGLES, (char *)"vtc" );
|
||||||
@ -162,10 +171,10 @@ void DrawText(wxString text, float x, float y, float angle=0, const wxColor & co
|
|||||||
//glColor4ub(color.Red(),color.Green(),color.Blue(),color.Alpha());
|
//glColor4ub(color.Red(),color.Green(),color.Blue(),color.Alpha());
|
||||||
|
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
glTranslatef(x,y,0);
|
glTranslatef(floor(x),floor(y),0);
|
||||||
glRotatef(angle, 0.0f, 0.0f, 1.0f);
|
glRotatef(angle, 0.0f, 0.0f, 1.0f);
|
||||||
DrawText2(text,-w/2.0,-h/2.0,font);
|
DrawText2(text,floor(-w/2.0),floor(-h/2.0),font);
|
||||||
glTranslatef(-x,-y,0);
|
glTranslatef(floor(-x),floor(-y),0);
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -442,7 +451,6 @@ void gGraphWindow::SetXBounds(double minx, double maxx)
|
|||||||
SetMinX(minx);
|
SetMinX(minx);
|
||||||
SetMaxX(maxx);
|
SetMaxX(maxx);
|
||||||
Refresh(false);
|
Refresh(false);
|
||||||
Update();
|
|
||||||
}
|
}
|
||||||
void gGraphWindow::ResetXBounds()
|
void gGraphWindow::ResetXBounds()
|
||||||
{
|
{
|
||||||
@ -964,7 +972,7 @@ void gGraphWindow::OnPaint(wxPaintEvent& event)
|
|||||||
|
|
||||||
SwapBuffers(); // Dump to screen.
|
SwapBuffers(); // Dump to screen.
|
||||||
|
|
||||||
event.Skip();
|
//event.Skip();
|
||||||
}
|
}
|
||||||
void gGraphWindow::OnSize(wxSizeEvent& event)
|
void gGraphWindow::OnSize(wxSizeEvent& event)
|
||||||
{
|
{
|
||||||
@ -1737,12 +1745,12 @@ void gBarChart::Plot(gGraphWindow & w,float scrx,float scry)
|
|||||||
str=FormatX(data->point[0][i].m_x);
|
str=FormatX(data->point[0][i].m_x);
|
||||||
|
|
||||||
GetTextExtent(str, textX, textY);
|
GetTextExtent(str, textX, textY);
|
||||||
if (t2>textY) {
|
if (t2>textY+6) {
|
||||||
int j=t1+((t2/2)-(textY/2));
|
int j=t1+((t2/2)-(textY/2));
|
||||||
if (m_direction==wxVERTICAL) {
|
if (m_direction==wxVERTICAL) {
|
||||||
DrawText(str,start_px-textX-8,j);
|
DrawText(str,start_px-textX-8,j);
|
||||||
} else {
|
} else {
|
||||||
DrawText(str,j,start_py-16-(textX/2),90,*wxBLACK);
|
DrawText(str,j,start_py-18-(textX/2),90,*wxBLACK);
|
||||||
}
|
}
|
||||||
} else draw_xticks_instead=true;
|
} else draw_xticks_instead=true;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ License: LGPL
|
|||||||
#define GRAPH_H
|
#define GRAPH_H
|
||||||
|
|
||||||
#include "gl_pbuffer.h"
|
#include "gl_pbuffer.h"
|
||||||
extern pBuffer *buffer;
|
extern pBuffer *pbuffer;
|
||||||
|
|
||||||
//#undef Yield
|
//#undef Yield
|
||||||
|
|
||||||
|
@ -16,14 +16,14 @@ namespace AutoVersion{
|
|||||||
//Standard Version Type
|
//Standard Version Type
|
||||||
static const long _MAJOR = 0;
|
static const long _MAJOR = 0;
|
||||||
static const long _MINOR = 7;
|
static const long _MINOR = 7;
|
||||||
static const long _BUILD = 6037;
|
static const long _BUILD = 6060;
|
||||||
static const long _REVISION = 16269;
|
static const long _REVISION = 16387;
|
||||||
|
|
||||||
//Miscellaneous Version Types
|
//Miscellaneous Version Types
|
||||||
static const long _BUILDS_COUNT = 6615;
|
static const long _BUILDS_COUNT = 6665;
|
||||||
#define _RC_FILEVERSION 0,7,6037,16269
|
#define _RC_FILEVERSION 0,7,6060,16387
|
||||||
#define _RC_FILEVERSION_STRING "0, 7, 6037, 16269\0"
|
#define _RC_FILEVERSION_STRING "0, 7, 6060, 16387\0"
|
||||||
static const char _FULLVERSION_STRING[] = "0.7.6037.16269";
|
static const char _FULLVERSION_STRING[] = "0.7.6060.16387";
|
||||||
|
|
||||||
//These values are to keep track of your versioning state, don't modify them.
|
//These values are to keep track of your versioning state, don't modify them.
|
||||||
static const long _BUILD_HISTORY = 0;
|
static const long _BUILD_HISTORY = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user