Applied DrawArc patch.

Some tests for ShowFullScreen() (doesn't work under GTK).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2000-09-05 09:12:43 +00:00
parent 009b6d2972
commit 77bb48f9bb
3 changed files with 24 additions and 3 deletions

View File

@@ -112,6 +112,7 @@ public:
void OnAbout( wxCommandEvent &event ); void OnAbout( wxCommandEvent &event );
void OnQuit( wxCommandEvent &event ); void OnQuit( wxCommandEvent &event );
void OnFullScreen( wxCommandEvent &event );
wxScrolledWindow *m_scrolled; wxScrolledWindow *m_scrolled;
wxTextCtrl *m_log; wxTextCtrl *m_log;
@@ -340,13 +341,15 @@ void MyCanvas::ScrollWindow( int dx, int dy, const wxRect *rect )
// MyFrame // MyFrame
const int ID_QUIT = 108; const int ID_QUIT = 108;
const int ID_ABOUT = 109; const int ID_FULL = 109;
const int ID_ABOUT = 110;
IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame ) IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame )
BEGIN_EVENT_TABLE(MyFrame,wxFrame) BEGIN_EVENT_TABLE(MyFrame,wxFrame)
EVT_MENU (ID_ABOUT, MyFrame::OnAbout) EVT_MENU (ID_ABOUT, MyFrame::OnAbout)
EVT_MENU (ID_QUIT, MyFrame::OnQuit) EVT_MENU (ID_QUIT, MyFrame::OnQuit)
EVT_MENU (ID_FULL, MyFrame::OnFullScreen)
END_EVENT_TABLE() END_EVENT_TABLE()
MyFrame::MyFrame() MyFrame::MyFrame()
@@ -355,6 +358,7 @@ MyFrame::MyFrame()
{ {
wxMenu *file_menu = new wxMenu(); wxMenu *file_menu = new wxMenu();
file_menu->Append( ID_ABOUT, "&About.."); file_menu->Append( ID_ABOUT, "&About..");
file_menu->Append( ID_FULL, "&Full screen..");
file_menu->Append( ID_QUIT, "E&xit\tAlt-X"); file_menu->Append( ID_QUIT, "E&xit\tAlt-X");
wxMenuBar *menu_bar = new wxMenuBar(); wxMenuBar *menu_bar = new wxMenuBar();
@@ -386,6 +390,13 @@ void MyFrame::OnQuit( wxCommandEvent &WXUNUSED(event) )
Close( TRUE ); Close( TRUE );
} }
void MyFrame::OnFullScreen( wxCommandEvent &WXUNUSED(event) )
{
#ifdef __MSW__
ShowFullScreen( TRUE, wxFULLSCREEN_NOBORDER|wxFULLSCREEN_NOCAPTION );
#endif
}
void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) ) void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) )
{ {
(void)wxMessageBox( "wxScroll demo II\n" (void)wxMessageBox( "wxScroll demo II\n"

View File

@@ -488,7 +488,12 @@ void wxWindowDC::DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
} }
if (m_pen.GetStyle() != wxTRANSPARENT) if (m_pen.GetStyle() != wxTRANSPARENT)
{
gdk_draw_arc( m_window, m_penGC, FALSE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 ); gdk_draw_arc( m_window, m_penGC, FALSE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 );
gdk_draw_line( m_window, m_penGC, xx1, yy1, xxc, yyc );
gdk_draw_line( m_window, m_penGC, xxc, yyc, xx2, yy2 );
}
} }
CalcBoundingBox (x1, y1); CalcBoundingBox (x1, y1);
@@ -511,7 +516,7 @@ void wxWindowDC::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxCoord
if (m_window) if (m_window)
{ {
wxCoord start = wxCoord(sa * 64.0); wxCoord start = wxCoord(sa * 64.0);
wxCoord end = wxCoord(ea * 64.0); wxCoord end = wxCoord((ea-sa) * 64.0);
if (m_brush.GetStyle() != wxTRANSPARENT) if (m_brush.GetStyle() != wxTRANSPARENT)
{ {

View File

@@ -488,7 +488,12 @@ void wxWindowDC::DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
} }
if (m_pen.GetStyle() != wxTRANSPARENT) if (m_pen.GetStyle() != wxTRANSPARENT)
{
gdk_draw_arc( m_window, m_penGC, FALSE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 ); gdk_draw_arc( m_window, m_penGC, FALSE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 );
gdk_draw_line( m_window, m_penGC, xx1, yy1, xxc, yyc );
gdk_draw_line( m_window, m_penGC, xxc, yyc, xx2, yy2 );
}
} }
CalcBoundingBox (x1, y1); CalcBoundingBox (x1, y1);
@@ -511,7 +516,7 @@ void wxWindowDC::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxCoord
if (m_window) if (m_window)
{ {
wxCoord start = wxCoord(sa * 64.0); wxCoord start = wxCoord(sa * 64.0);
wxCoord end = wxCoord(ea * 64.0); wxCoord end = wxCoord((ea-sa) * 64.0);
if (m_brush.GetStyle() != wxTRANSPARENT) if (m_brush.GetStyle() != wxTRANSPARENT)
{ {