File: basictest.cpp

package info (click to toggle)
wxpython4.0 4.2.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 221,752 kB
  • sloc: cpp: 962,555; python: 230,573; ansic: 170,731; makefile: 51,756; sh: 9,342; perl: 1,564; javascript: 584; php: 326; xml: 200
file content (46 lines) | stat: -rw-r--r-- 1,474 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
///////////////////////////////////////////////////////////////////////////////
// Name:        tests/drawing/basictest.cpp
// Purpose:     Basic tests for wxGraphicsContext
// Author:      Armel Asselin
// Created:     2014-02-28
// Copyright:   (c) 2014 ElliƩ Computing <opensource@elliecomputing.com>
///////////////////////////////////////////////////////////////////////////////

// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------

#include "testprec.h"

#ifndef WX_PRECOMP
    #include "wx/app.h"
    #include "wx/font.h"
//    #include "wx/window.h"
#endif // WX_PRECOMP

#define _WX_CURSOR_H_BASE_


#include "drawing.h"

#if wxUSE_TEST_GC_DRAWING

const GraphicsContextDrawingTestCase::DrawingTestCase
GraphicsContextDrawingTestCase::ms_drawingBasicTc = {
    1, &GraphicsContextDrawingTestCase::DoBasicDrawings, 800, 600, 72., true
};

void GraphicsContextDrawingTestCase::DoBasicDrawings (wxGraphicsContext *gc)
{
    // this test is expected to be portable, on any platform, in order to keep
    //  that property, it should contain only axis aligned/integer drawings so
    //  that the anti-aliasing method does not cause troubles.

    wxGraphicsBrush gbBackground =
        gc->CreateBrush (wxBrush (wxColour (255, 255, 255)));

    gc->SetBrush (gbBackground);
    gc->DrawRectangle (0, 0, 800, 600);
}

#endif // wxUSE_TEST_GC_DRAWING