X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3454ecd508f3d5a2a31f1c1d9048de80763135d1..3030ae493df7500fd5da7555f141c0c8a690bd8a:/contrib/src/ogl/lines.cpp diff --git a/contrib/src/ogl/lines.cpp b/contrib/src/ogl/lines.cpp index b668757829..a5982157a0 100644 --- a/contrib/src/ogl/lines.cpp +++ b/contrib/src/ogl/lines.cpp @@ -9,11 +9,6 @@ // 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" @@ -22,11 +17,11 @@ #endif #ifndef WX_PRECOMP -#include +#include "wx/wx.h" #endif #if wxUSE_PROLOGIO -#include +#include "wx/deprecated/wxexpr.h" #endif #ifdef new @@ -841,8 +836,8 @@ void wxLineShape::DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool p 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); @@ -962,10 +957,10 @@ void wxLineShape::FindNth(wxShape *image, int *nth, int *no_arcs, bool incoming) 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 ); @@ -1549,7 +1544,7 @@ void wxLineShape::ReadAttributes(wxExpr *clause) 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) @@ -1733,7 +1728,7 @@ void wxLineShape::OnSizingDragLeft(wxControlPoint* pt, bool WXUNUSED(draw), doub dc.SetLogicalFunction(OGLRBLF); - wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT); + wxPen dottedPen(*wxBLACK, 1, wxDOT); dc.SetPen(dottedPen); dc.SetBrush((* wxTRANSPARENT_BRUSH)); @@ -1746,10 +1741,10 @@ void wxLineShape::OnSizingDragLeft(wxControlPoint* pt, bool WXUNUSED(draw), doub 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); @@ -1794,10 +1789,10 @@ void wxLineShape::OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, 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); @@ -2355,7 +2350,7 @@ wxArrowHead::wxArrowHead(WXTYPE type, int end, double size, double dist, const w 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; @@ -2407,7 +2402,7 @@ wxLabelShape::wxLabelShape(wxLineShape *parent, wxShapeRegion *region, double w, { m_lineShape = parent; m_shapeRegion = region; - SetPen(wxThePenList->FindOrCreatePen(wxColour(0, 0, 0), 1, wxDOT)); + SetPen(wxThePenList->FindOrCreatePen(*wxBLACK, 1, wxDOT)); } wxLabelShape::~wxLabelShape() @@ -2508,4 +2503,3 @@ void wxLabelShape::OnRightClick(double x, double y, int keys, int attachment) { m_lineShape->GetEventHandler()->OnRightClick(x, y, keys, attachment); } -