// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "basic.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
#include <stdio.h>
#include <ctype.h>
-#include <math.h>
#include "wx/ogl/ogl.h"
return false;
}
-void wxShape::SetPen(wxPen *the_pen)
+void wxShape::SetPen(const wxPen *the_pen)
{
m_pen = the_pen;
}
-void wxShape::SetBrush(wxBrush *the_brush)
+void wxShape::SetBrush(const wxBrush *the_brush)
{
m_brush = the_brush;
}
dc.SetLogicalFunction(OGLRBLF);
- wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
+ wxPen dottedPen(*wxBLACK, 1, wxDOT);
dc.SetPen(dottedPen);
dc.SetBrush(* wxTRANSPARENT_BRUSH);
// m_xpos = xx; m_ypos = yy;
dc.SetLogicalFunction(OGLRBLF);
- wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
+ wxPen dottedPen(*wxBLACK, 1, wxDOT);
dc.SetPen(dottedPen);
dc.SetBrush((* wxTRANSPARENT_BRUSH));
void wxShape::OnEndDragLeft(double x, double y, int keys, int attachment)
{
+ if (!m_draggable)
+ return;
m_canvas->ReleaseMouse();
if ((m_sensitivity & OP_DRAG_LEFT) != OP_DRAG_LEFT)
{
double left = (double)(m_xpos - w/2.0);
double right = (double)(m_xpos + w/2.0);
+#if 0
/* bool isEnd = */ (line && line->IsEnd(this));
+#endif
int physicalAttachment = LogicalToPhysicalAttachment(attachment);
// to logical (0 -> 1 if rotated by 90 degrees)
int wxShape::PhysicalToLogicalAttachment(int physicalAttachment) const
{
- const double pi = 3.1415926535897932384626433832795 ;
+ const double pi = M_PI ;
int i;
if (oglRoughlyEqual(GetRotation(), 0.0))
{
// to physical (0 is always North)
int wxShape::LogicalToPhysicalAttachment(int logicalAttachment) const
{
- const double pi = 3.1415926535897932384626433832795 ;
+ const double pi = M_PI ;
int i;
if (oglRoughlyEqual(GetRotation(), 0.0))
{
void wxShape::Rotate(double WXUNUSED(x), double WXUNUSED(y), double theta)
{
- const double pi = 3.1415926535897932384626433832795 ;
+ const double pi = M_PI ;
m_rotation = theta;
if (m_rotation < 0.0)
{
}
return * g_oglWhiteBackgroundBrush;
}
-