X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1484b5cc701329c54bbe70f2a155119fd86945c7..31d7fc0f9cb3f5913ecd4a039a816487a6753a93:/contrib/src/ogl/lines.cpp?ds=sidebyside diff --git a/contrib/src/ogl/lines.cpp b/contrib/src/ogl/lines.cpp index 850c19434b..95e02cb53a 100644 --- a/contrib/src/ogl/lines.cpp +++ b/contrib/src/ogl/lines.cpp @@ -115,8 +115,7 @@ void wxLineShape::MakeLineControlPoints(int n) } m_lineControlPoints = new wxList; - int i = 0; - for (i = 0; i < n; i++) + for (int i = 0; i < n; i++) { wxRealPoint *point = new wxRealPoint(-999, -999); m_lineControlPoints->Append((wxObject*) point); @@ -288,7 +287,7 @@ void wxLineShape::DrawRegion(wxDC& dc, wxShapeRegion *region, double x, double y dc.DrawRectangle((long)(xp - w/2.0), (long)(yp - h/2.0), (long)w, (long)h); if (m_pen) dc.SetPen(* m_pen); - dc.SetTextForeground(* region->GetActualColourObject()); + dc.SetTextForeground(region->GetActualColourObject()); #ifdef __WXMSW__ dc.SetTextBackground(GetBackgroundBrush().GetColour()); @@ -598,7 +597,7 @@ void wxLineShape::DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool p double positionOnLineX, positionOnLineY; // Position of start point of line, at the end of which we draw the arrow. - double startPositionX, startPositionY; + double startPositionX = 0.0 , startPositionY = 0.0; switch (arrow->GetPosition()) { @@ -691,7 +690,7 @@ void wxLineShape::DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool p double y3 = positionOnLineY; double d = -arrow->GetYOffset(); // Negate so +offset is above line - double theta = 0.0; + double theta; if (x3 == x1) theta = (double)(myPi/2.0); else @@ -746,7 +745,7 @@ void wxLineShape::DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool p dc.SetPen(* m_pen); if (arrow->_GetType() == ARROW_HOLLOW_CIRCLE) - dc.SetBrush(* g_oglWhiteBackgroundBrush); + dc.SetBrush(GetBackgroundBrush()); else dc.SetBrush(* m_brush); @@ -2036,9 +2035,9 @@ bool wxLineShape::AddArrowOrdered(wxArrowHead *arrow, wxList& referenceList, int return TRUE; } + wxArrowHead *currArrow = (wxArrowHead *)currNode->GetData(); while (refNode && currNode) { - wxArrowHead *currArrow = (wxArrowHead *)currNode->GetData(); refArrow = (wxArrowHead *)refNode->GetData(); // Matching: advance current arrow pointer @@ -2318,7 +2317,7 @@ int wxLineShape::GetAlignmentType(bool isEnd) wxRealPoint *wxLineShape::GetNextControlPoint(wxShape *nodeObject) { int n = m_lineControlPoints->GetCount(); - int nn = 0; + int nn; if (m_to == nodeObject) { // Must be END of line, so we want (n - 1)th control point.