#include <wx/wx.h>
class Simple:public wxFrame
{
public:
Simple(const wxString& title);
protected:
void OnPaint(wxPaintEvent& event);
};
Simple::Simple(const wxString& title)
:wxFrame(NULL,-1,title,wxPoint(-1,-1),wxSize(680,580))
{
Bind(wxEVT_PAINT,wxPaintEventHandler(Simple::OnPaint),this);
Centre();
}
void Simple::OnPaint(wxPaintEvent& event)
{
wxPaintDC dc(this);
wxColour col1,col2;
col1.Set("#0C0C0C");
col2.Set("#FFFFFF");
wxBrush brush(col2,wxTRANSPARENT);
dc.SetBrush(brush);
dc.SetPen(wxPen(col1,1,wxSOLID));//solid
dc.DrawRectangle(10,15,90,60);
dc.SetPen(wxPen(col1,2,wxDOT));//dot
dc.DrawRoundedRectangle(wxPoint(130,15),wxSize(90,60),10);
dc.SetPen(wxPen(col1,3,wxLONG_DASH));//long dash
dc.DrawRectangle(250,15,90,60);
dc.SetPen(wxPen(col1,4,wxSHORT_DASH));
dc.DrawArc(wxPoint(10,105),wxPoint(110,120),wxPoint(50,90));
dc.SetPen(wxPen(col1,5,wxDOT_DASH));
dc.DrawEllipse(wxPoint(130,105),wxSize(90,60));
dc.SetPen(wxPen(col1,6,wxTRANSPARENT));
dc.DrawCircle(wxPoint(250,105),60);
}