mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-17 19:20:46 +00:00
AntiAliasing support (toggled in View Menu)
This commit is contained in:
parent
1421d12199
commit
c84b116a7a
@ -4134,7 +4134,7 @@
|
|||||||
"sleeplib/machine.h"
|
"sleeplib/machine.h"
|
||||||
"graph.h"
|
"graph.h"
|
||||||
|
|
||||||
1305215599 /usr/include/wx-2.9/wx/dcgraph.h
|
1307528666 /usr/include/wx-2.9/wx/dcgraph.h
|
||||||
"wx/dc.h"
|
"wx/dc.h"
|
||||||
"wx/geometry.h"
|
"wx/geometry.h"
|
||||||
"wx/graphics.h"
|
"wx/graphics.h"
|
||||||
@ -4145,7 +4145,7 @@
|
|||||||
"wx/gdicmn.h"
|
"wx/gdicmn.h"
|
||||||
"wx/math.h"
|
"wx/math.h"
|
||||||
|
|
||||||
1305215599 /usr/include/wx-2.9/wx/graphics.h
|
1307528666 /usr/include/wx-2.9/wx/graphics.h
|
||||||
"wx/defs.h"
|
"wx/defs.h"
|
||||||
"wx/geometry.h"
|
"wx/geometry.h"
|
||||||
"wx/dynarray.h"
|
"wx/dynarray.h"
|
||||||
@ -8210,12 +8210,12 @@
|
|||||||
"wx/treebase.h"
|
"wx/treebase.h"
|
||||||
"wx/hashmap.h"
|
"wx/hashmap.h"
|
||||||
|
|
||||||
1307618682 source:/home/mark/projects/git/sleepyhead/src/GUIFrame.cpp
|
1307708368 source:/home/mark/projects/git/sleepyhead/src/GUIFrame.cpp
|
||||||
"wx/wxprec.h"
|
"wx/wxprec.h"
|
||||||
<wx/wx.h>
|
<wx/wx.h>
|
||||||
"GUIFrame.h"
|
"GUIFrame.h"
|
||||||
|
|
||||||
1307618682 /home/mark/projects/git/sleepyhead/src/GUIFrame.h
|
1307708368 /home/mark/projects/git/sleepyhead/src/GUIFrame.h
|
||||||
<wx/intl.h>
|
<wx/intl.h>
|
||||||
<wx/string.h>
|
<wx/string.h>
|
||||||
<wx/bitmap.h>
|
<wx/bitmap.h>
|
||||||
@ -8258,7 +8258,7 @@
|
|||||||
1307418393 /home/mark/projects/git/sleepyhead/src/SleepyHeadApp.h
|
1307418393 /home/mark/projects/git/sleepyhead/src/SleepyHeadApp.h
|
||||||
<wx/app.h>
|
<wx/app.h>
|
||||||
|
|
||||||
1307618623 /home/mark/projects/git/sleepyhead/src/SleepyHeadMain.h
|
1307708712 /home/mark/projects/git/sleepyhead/src/SleepyHeadMain.h
|
||||||
<wx/listbox.h>
|
<wx/listbox.h>
|
||||||
<wx/treectrl.h>
|
<wx/treectrl.h>
|
||||||
"SleepyHeadApp.h"
|
"SleepyHeadApp.h"
|
||||||
@ -8304,7 +8304,7 @@
|
|||||||
<sleeplib/machine.h>
|
<sleeplib/machine.h>
|
||||||
<list>
|
<list>
|
||||||
|
|
||||||
1307704847 /home/mark/projects/git/sleepyhead/src/version.h
|
1307708812 /home/mark/projects/git/sleepyhead/src/version.h
|
||||||
|
|
||||||
1307627540 /home/mark/projects/git/sleepyhead/src/libs/sleeplib/prs1_loader.h
|
1307627540 /home/mark/projects/git/sleepyhead/src/libs/sleeplib/prs1_loader.h
|
||||||
"machine.h"
|
"machine.h"
|
||||||
@ -8322,7 +8322,7 @@
|
|||||||
"preferences.h"
|
"preferences.h"
|
||||||
"tinyxml/tinyxml.h"
|
"tinyxml/tinyxml.h"
|
||||||
|
|
||||||
1307698043 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadMain.cpp
|
1307708727 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>
|
||||||
@ -8342,10 +8342,11 @@
|
|||||||
"sleeplib/profiles.h"
|
"sleeplib/profiles.h"
|
||||||
"sleeplib/machine_loader.h"
|
"sleeplib/machine_loader.h"
|
||||||
|
|
||||||
1307704772 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp
|
1307708472 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp
|
||||||
<wx/settings.h>
|
<wx/settings.h>
|
||||||
<wx/dcbuffer.h>
|
<wx/dcbuffer.h>
|
||||||
<wx/log.h>
|
<wx/log.h>
|
||||||
|
<wx/dcgraph.h>
|
||||||
<math.h>
|
<math.h>
|
||||||
"graph.h"
|
"graph.h"
|
||||||
"sleeplib/profiles.h"
|
"sleeplib/profiles.h"
|
||||||
|
@ -64,6 +64,9 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons
|
|||||||
ViewMenuFruitsalad = new wxMenuItem( ViewMenu, wxID_ANY, wxString( _("Fruit Salad") ) , wxEmptyString, wxITEM_CHECK );
|
ViewMenuFruitsalad = new wxMenuItem( ViewMenu, wxID_ANY, wxString( _("Fruit Salad") ) , wxEmptyString, wxITEM_CHECK );
|
||||||
ViewMenu->Append( ViewMenuFruitsalad );
|
ViewMenu->Append( ViewMenuFruitsalad );
|
||||||
|
|
||||||
|
ViewMenuAntiAliasing = new wxMenuItem( ViewMenu, wxID_ANY, wxString( _("Try Anti-Aliasing") ) , wxEmptyString, wxITEM_CHECK );
|
||||||
|
ViewMenu->Append( ViewMenuAntiAliasing );
|
||||||
|
|
||||||
wxMenuItem* m_separator2;
|
wxMenuItem* m_separator2;
|
||||||
m_separator2 = ViewMenu->AppendSeparator();
|
m_separator2 = ViewMenu->AppendSeparator();
|
||||||
|
|
||||||
@ -110,6 +113,7 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons
|
|||||||
this->Connect( ViewMenuSerial->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnShowSerial ) );
|
this->Connect( ViewMenuSerial->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnShowSerial ) );
|
||||||
this->Connect( ViewMenuLinkGraph->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnLinkGraphs ) );
|
this->Connect( ViewMenuLinkGraph->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnLinkGraphs ) );
|
||||||
this->Connect( ViewMenuFruitsalad->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnFruitsalad ) );
|
this->Connect( ViewMenuFruitsalad->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnFruitsalad ) );
|
||||||
|
this->Connect( ViewMenuAntiAliasing->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnAntiAliasing ) );
|
||||||
this->Connect( ViewMenuFullscreen->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnFullscreen ) );
|
this->Connect( ViewMenuFullscreen->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnFullscreen ) );
|
||||||
this->Connect( ToolsMenuScreenshot->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnScreenshot ) );
|
this->Connect( ToolsMenuScreenshot->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnScreenshot ) );
|
||||||
this->Connect( HelpMenuAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnAbout ) );
|
this->Connect( HelpMenuAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnAbout ) );
|
||||||
@ -127,6 +131,7 @@ GUIFrame::~GUIFrame()
|
|||||||
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnShowSerial ) );
|
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnShowSerial ) );
|
||||||
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnLinkGraphs ) );
|
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnLinkGraphs ) );
|
||||||
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnFruitsalad ) );
|
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnFruitsalad ) );
|
||||||
|
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnAntiAliasing ) );
|
||||||
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnFullscreen ) );
|
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnFullscreen ) );
|
||||||
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnScreenshot ) );
|
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnScreenshot ) );
|
||||||
this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnAbout ) );
|
this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnAbout ) );
|
||||||
|
@ -50,6 +50,7 @@ class GUIFrame : public wxFrame
|
|||||||
wxMenuItem* ViewMenuSerial;
|
wxMenuItem* ViewMenuSerial;
|
||||||
wxMenuItem* ViewMenuLinkGraph;
|
wxMenuItem* ViewMenuLinkGraph;
|
||||||
wxMenuItem* ViewMenuFruitsalad;
|
wxMenuItem* ViewMenuFruitsalad;
|
||||||
|
wxMenuItem* ViewMenuAntiAliasing;
|
||||||
wxMenu* ProfileMenu;
|
wxMenu* ProfileMenu;
|
||||||
wxMenu* ToolsMenu;
|
wxMenu* ToolsMenu;
|
||||||
wxMenu* HelpMenu;
|
wxMenu* HelpMenu;
|
||||||
@ -65,6 +66,7 @@ class GUIFrame : public wxFrame
|
|||||||
virtual void OnShowSerial( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnShowSerial( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnLinkGraphs( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnLinkGraphs( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnFruitsalad( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnFruitsalad( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
virtual void OnAntiAliasing( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnFullscreen( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnFullscreen( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnScreenshot( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnScreenshot( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnAbout( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnAbout( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
@ -85,6 +85,7 @@ SleepyHeadFrame::SleepyHeadFrame(wxFrame *frame)
|
|||||||
if (!pref.Exists("ShowSerialNumbers")) pref["ShowSerialNumbers"]=false;
|
if (!pref.Exists("ShowSerialNumbers")) pref["ShowSerialNumbers"]=false;
|
||||||
if (!pref.Exists("fruitsalad")) pref["fruitsalad"]=true;
|
if (!pref.Exists("fruitsalad")) pref["fruitsalad"]=true;
|
||||||
if (!pref.Exists("LinkGraphMovement")) pref["LinkGraphMovement"]=true;
|
if (!pref.Exists("LinkGraphMovement")) pref["LinkGraphMovement"]=true;
|
||||||
|
if (!pref.Exists("UseAntiAliasing")) pref["UseAntiAliasing"]=false;
|
||||||
if (!pref.Exists("ProfileVersion")) pref["ProfileVersion"]=(long)0;
|
if (!pref.Exists("ProfileVersion")) pref["ProfileVersion"]=(long)0;
|
||||||
|
|
||||||
if (pref["ProfileVersion"].GetInteger()<profile_version) {
|
if (pref["ProfileVersion"].GetInteger()<profile_version) {
|
||||||
@ -100,6 +101,7 @@ SleepyHeadFrame::SleepyHeadFrame(wxFrame *frame)
|
|||||||
ViewMenuSerial->Check(pref["ShowSerialNumbers"]);
|
ViewMenuSerial->Check(pref["ShowSerialNumbers"]);
|
||||||
ViewMenuFruitsalad->Check(pref["fruitsalad"]);
|
ViewMenuFruitsalad->Check(pref["fruitsalad"]);
|
||||||
ViewMenuLinkGraph->Check(pref["LinkGraphMovement"]);
|
ViewMenuLinkGraph->Check(pref["LinkGraphMovement"]);
|
||||||
|
ViewMenuAntiAliasing->Check(pref["UseAntiAliasing"]);
|
||||||
|
|
||||||
// wxDisableAsserts();
|
// wxDisableAsserts();
|
||||||
|
|
||||||
@ -268,6 +270,13 @@ void SleepyHeadFrame::OnShowSerial(wxCommandEvent& event)
|
|||||||
void SleepyHeadFrame::OnFruitsalad(wxCommandEvent& event)
|
void SleepyHeadFrame::OnFruitsalad(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
pref["fruitsalad"]=event.IsChecked();
|
pref["fruitsalad"]=event.IsChecked();
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
void SleepyHeadFrame::OnAntiAliasing( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
pref["UseAntiAliasing"]=event.IsChecked();
|
||||||
|
Refresh();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SleepyHeadFrame::OnAbout(wxCommandEvent &event)
|
void SleepyHeadFrame::OnAbout(wxCommandEvent &event)
|
||||||
|
@ -111,6 +111,7 @@ class SleepyHeadFrame: public GUIFrame
|
|||||||
virtual void OnProfileSelected(wxCommandEvent& event);
|
virtual void OnProfileSelected(wxCommandEvent& event);
|
||||||
virtual void OnFruitsalad(wxCommandEvent& event);
|
virtual void OnFruitsalad(wxCommandEvent& event);
|
||||||
virtual void OnLinkGraphs( wxCommandEvent& event );
|
virtual void OnLinkGraphs( wxCommandEvent& event );
|
||||||
|
virtual void OnAntiAliasing( wxCommandEvent& event );
|
||||||
|
|
||||||
|
|
||||||
virtual void UpdateProfiles();
|
virtual void UpdateProfiles();
|
||||||
|
@ -335,6 +335,21 @@
|
|||||||
<event name="OnMenuSelection">OnFruitsalad</event>
|
<event name="OnMenuSelection">OnFruitsalad</event>
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="wxMenuItem" expanded="1">
|
||||||
|
<property name="bitmap"></property>
|
||||||
|
<property name="checked">0</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="help"></property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="kind">wxITEM_CHECK</property>
|
||||||
|
<property name="label">Try Anti-Aliasing</property>
|
||||||
|
<property name="name">ViewMenuAntiAliasing</property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<property name="shortcut"></property>
|
||||||
|
<property name="unchecked_bitmap"></property>
|
||||||
|
<event name="OnMenuSelection">OnAntiAliasing</event>
|
||||||
|
<event name="OnUpdateUI"></event>
|
||||||
|
</object>
|
||||||
<object class="separator" expanded="1">
|
<object class="separator" expanded="1">
|
||||||
<property name="name">m_separator2</property>
|
<property name="name">m_separator2</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
|
@ -8,6 +8,7 @@ License: LGPL
|
|||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
#include <wx/dcbuffer.h>
|
#include <wx/dcbuffer.h>
|
||||||
#include <wx/log.h>
|
#include <wx/log.h>
|
||||||
|
#include <wx/dcgraph.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "graph.h"
|
#include "graph.h"
|
||||||
#include "sleeplib/profiles.h"
|
#include "sleeplib/profiles.h"
|
||||||
@ -634,11 +635,18 @@ wxBitmap * gGraphWindow::RenderBitmap(int width,int height)
|
|||||||
|
|
||||||
void gGraphWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
|
void gGraphWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
|
wxDC *pdc;
|
||||||
|
if (pref["UseAntiAliasing"]) {
|
||||||
|
pdc=new wxGCDC(this);
|
||||||
|
} else {
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
wxAutoBufferedPaintDC dc(this);
|
pdc=new wxAutoBufferedPaintDC(this);
|
||||||
#else
|
#else
|
||||||
wxPaintDC dc(this);
|
pdc=new wxPaintDC(this);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
wxDC &dc=*pdc;
|
||||||
|
|
||||||
GetClientSize(&m_scrX, &m_scrY);
|
GetClientSize(&m_scrX, &m_scrY);
|
||||||
|
|
||||||
dc.SetPen( *wxTRANSPARENT_PEN );
|
dc.SetPen( *wxTRANSPARENT_PEN );
|
||||||
@ -677,7 +685,7 @@ void gGraphWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
|
|||||||
if (m_mouseRBrect.width>0)
|
if (m_mouseRBrect.width>0)
|
||||||
dc.DrawRectangle(m_mouseRBrect);
|
dc.DrawRectangle(m_mouseRBrect);
|
||||||
}
|
}
|
||||||
|
delete pdc;
|
||||||
}
|
}
|
||||||
void gGraphWindow::OnSize(wxSizeEvent& event)
|
void gGraphWindow::OnSize(wxSizeEvent& event)
|
||||||
{
|
{
|
||||||
|
@ -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 = 4393;
|
static const long BUILD = 4416;
|
||||||
static const long REVISION = 7184;
|
static const long REVISION = 7311;
|
||||||
|
|
||||||
//Miscellaneous Version Types
|
//Miscellaneous Version Types
|
||||||
static const long BUILDS_COUNT = 3052;
|
static const long BUILDS_COUNT = 3112;
|
||||||
#define RC_FILEVERSION 0,7,4393,7184
|
#define RC_FILEVERSION 0,7,4416,7311
|
||||||
#define RC_FILEVERSION_STRING "0, 7, 4393, 7184\0"
|
#define RC_FILEVERSION_STRING "0, 7, 4416, 7311\0"
|
||||||
static const char FULLVERSION_STRING[] = "0.7.4393.7184";
|
static const char FULLVERSION_STRING[] = "0.7.4416.7311";
|
||||||
|
|
||||||
//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