Debian Codegraph @

DatabaseExplorer/NArrow.cpp

raw
1 //////////////////////////////////////////////////////////////////////////////
2 //////////////////////////////////////////////////////////////////////////////
3 //
4 // copyright : (C) 2014 Eran Ifrah
5 // file name : NArrow.cpp
6 //
7 // -------------------------------------------------------------------------
8 // A
9 // _____ _ _ _ _
10 // / __ \ | | | | (_) |
11 // | / \/ ___ __| | ___| | _| |_ ___
12 // | | / _ \ / _ |/ _ \ | | | __/ _ )
13 // | \__/\ (_) | (_| | __/ |___| | || __/
14 // \____/\___/ \__,_|\___\_____/_|\__\___|
15 //
16 // F i l e
17 //
18 // This program is free software; you can redistribute it and/or modify
19 // it under the terms of the GNU General Public License as published by
20 // the Free Software Foundation; either version 2 of the License, or
21 // (at your option) any later version.
22 //
23 //////////////////////////////////////////////////////////////////////////////
24 //////////////////////////////////////////////////////////////////////////////
25
26 #include "NArrow.h"
27
28 // arrow shape
29 static const wxRealPoint arrow[6]={wxRealPoint(0,4), wxRealPoint(10,0),wxRealPoint(10,4),wxRealPoint(10,-4),wxRealPoint(10,0), wxRealPoint(0,-4)};
30
31 XS_IMPLEMENT_CLONABLE_CLASS(NArrow, wxSFSolidArrow);
32
33
34 NArrow::NArrow(void):wxSFSolidArrow()
35 {
36 }
37
38 NArrow::NArrow(const NArrow& obj): wxSFSolidArrow(obj)
39 {
40 }
41
42 NArrow::NArrow(wxSFShapeBase* parent):wxSFSolidArrow(parent)
43 {
44 }
45
46 NArrow::~NArrow()
47 {
48 }
49
50 void NArrow::Draw(const wxRealPoint& from, const wxRealPoint& to, wxDC& dc)
51 {
52 wxPoint rarrow[6];
53
54 TranslateArrow( rarrow, arrow, 6, from, to );
55
56 dc.SetPen(m_Pen);
57 dc.SetBrush(wxNullBrush);
58 dc.DrawLines(6, rarrow);
59 dc.SetBrush(wxNullBrush);
60 dc.SetPen(wxNullPen);
61 }