Пример #1
0
    GraphicsBenchmarkFrame()
        : wxFrame(NULL, wxID_ANY, "wxWidgets Graphics Benchmark")
    {
        Connect(wxEVT_PAINT,
                wxPaintEventHandler(GraphicsBenchmarkFrame::OnPaint));

        Show();
        SetClientSize(opts.width, opts.height);
        wxClientDC dc(this);
        BenchmarkLines("client", dc);

        wxBitmap bmp(opts.width, opts.height);
        wxMemoryDC dc2(bmp);
        BenchmarkLines("memory", dc2);
    }
Пример #2
0
    void OnPaint(wxPaintEvent& WXUNUSED(event))
    {
        wxPaintDC dc(this);

        BenchmarkLines(" paint", dc);

        wxTheApp->ExitMainLoop();
    }
Пример #3
0
 void BenchmarkAll(const wxString& msg, wxDC& dc)
 {
     BenchmarkBitmaps(msg, dc);
     BenchmarkImages(msg, dc);
     BenchmarkLines(msg, dc);
     BenchmarkRawBitmaps(msg, dc);
     BenchmarkRectangles(msg, dc);
     BenchmarkRoundedRectangles(msg, dc);
     BenchmarkCircles(msg, dc);
     BenchmarkEllipses(msg, dc);
 }