// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "lines.h"
-#pragma implementation "linesp.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#endif
#ifndef WX_PRECOMP
-#include <wx/wx.h>
+#include "wx/wx.h"
#endif
#if wxUSE_PROLOGIO
-#include <wx/deprecated/wxexpr.h>
+#include "wx/deprecated/wxexpr.h"
#endif
#ifdef new
#endif
#include <ctype.h>
-#include <math.h>
#include "wx/ogl/ogl.h"
* Add yOffset to arrow, if any
*/
- const double myPi = (double) 3.14159265;
+ const double myPi = (double) M_PI;
// The translation that the y offset may give
double deltaX = 0.0;
double deltaY = 0.0;
void wxLineShape::OnErase(wxDC& dc)
{
- wxPen *old_pen = m_pen;
- wxBrush *old_brush = m_brush;
+ const wxPen *old_pen = m_pen;
+ const wxBrush *old_brush = m_brush;
wxPen bg_pen = GetBackgroundPen();
wxBrush bg_brush = GetBackgroundBrush();
SetPen(&bg_pen);
void wxLineShape::OnDrawOutline(wxDC& dc, double WXUNUSED(x), double WXUNUSED(y), double WXUNUSED(w), double WXUNUSED(h))
{
- wxPen *old_pen = m_pen;
- wxBrush *old_brush = m_brush;
+ const wxPen *old_pen = m_pen;
+ const wxBrush *old_brush = m_brush;
- wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
+ wxPen dottedPen(*wxBLACK, 1, wxDOT);
SetPen(& dottedPen);
SetBrush( wxTRANSPARENT_BRUSH );
wxExpr *spacingExpr = node->Nth(7);
if (type_expr)
- arrowType = (int)type_expr->IntegerValue();
+ arrowType = (WXTYPE)type_expr->IntegerValue();
if (end_expr)
arrowEnd = (int)end_expr->IntegerValue();
if (dist_expr)
dc.SetLogicalFunction(OGLRBLF);
- wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
+ wxPen dottedPen(*wxBLACK, 1, wxDOT);
dc.SetPen(dottedPen);
dc.SetBrush((* wxTRANSPARENT_BRUSH));
wxLineShape *lineShape = (wxLineShape *)this;
- wxPen *old_pen = lineShape->GetPen();
- wxBrush *old_brush = lineShape->GetBrush();
+ const wxPen *old_pen = lineShape->GetPen();
+ const wxBrush *old_brush = lineShape->GetBrush();
- wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
+ wxPen dottedPen(*wxBLACK, 1, wxDOT);
lineShape->SetPen(& dottedPen);
lineShape->SetBrush(wxTRANSPARENT_BRUSH);
lpt->m_xpos = x; lpt->m_ypos = y;
lpt->m_point->x = x; lpt->m_point->y = y;
- wxPen *old_pen = lineShape->GetPen();
- wxBrush *old_brush = lineShape->GetBrush();
+ const wxPen *old_pen = lineShape->GetPen();
+ const wxBrush *old_brush = lineShape->GetBrush();
- wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
+ wxPen dottedPen(*wxBLACK, 1, wxDOT);
lineShape->SetPen(& dottedPen);
lineShape->SetBrush(wxTRANSPARENT_BRUSH);
m_id = wxNewId();
}
-wxArrowHead::wxArrowHead(wxArrowHead& toCopy)
+wxArrowHead::wxArrowHead(wxArrowHead& toCopy):wxObject()
{
m_arrowType = toCopy.m_arrowType; m_arrowEnd = toCopy.GetArrowEnd();
m_arrowSize = toCopy.m_arrowSize;
{
m_lineShape = parent;
m_shapeRegion = region;
- SetPen(wxThePenList->FindOrCreatePen(wxColour(0, 0, 0), 1, wxDOT));
+ SetPen(wxThePenList->FindOrCreatePen(*wxBLACK, 1, wxDOT));
}
wxLabelShape::~wxLabelShape()
{
m_lineShape->GetEventHandler()->OnRightClick(x, y, keys, attachment);
}
-