bool Check_CC_point(const CC_point& underTest, const CC_point_values& values) { bool running_value = true; for (unsigned i = 0; i < CC_point::kNumRefPoints; ++i) running_value = running_value && (underTest.mRef[i] == values.mRef[i]); return running_value && (underTest.mFlags == values.mFlags) && (underTest.mSym == values.mSym) && (underTest.mPos == values.mPos) && (underTest.GetFlip() == values.GetFlip) ; }
void DrawPointHelper(wxDC& dc, const CalChartConfiguration& config, const CC_coord& pos, const CC_point& point, const wxString& label) { SaveAndRestore_Brush restore(dc); const float circ_r = Float2Coord(config.Get_DotRatio()); const float offset = circ_r / 2; const float plineoff = offset * config.Get_PLineRatio(); const float slineoff = offset * config.Get_SLineRatio(); float textoff = offset * 1.25; long x = pos.x; long y = pos.y; switch (point.GetSymbol()) { case SYMBOL_SOL: case SYMBOL_SOLBKSL: case SYMBOL_SOLSL: case SYMBOL_SOLX: break; default: dc.SetBrush(*wxTRANSPARENT_BRUSH); } dc.DrawEllipse(x - offset, y - offset, circ_r, circ_r); switch (point.GetSymbol()) { case SYMBOL_SL: case SYMBOL_X: dc.DrawLine(x - plineoff, y + plineoff, x + plineoff, y - plineoff); break; case SYMBOL_SOLSL: case SYMBOL_SOLX: dc.DrawLine(x - slineoff, y + slineoff, x + slineoff, y - slineoff); break; default: break; } switch (point.GetSymbol()) { case SYMBOL_BKSL: case SYMBOL_X: dc.DrawLine(x - plineoff, y - plineoff, x + plineoff, y + plineoff); break; case SYMBOL_SOLBKSL: case SYMBOL_SOLX: dc.DrawLine(x - slineoff, y - slineoff, x + slineoff, y + slineoff); break; default: break; } if (point.LabelIsVisible()) { wxCoord textw, texth, textd; dc.GetTextExtent(label, &textw, &texth, &textd); dc.DrawText(label, point.GetFlip() ? x : (x - textw), y - textoff - texth + textd); } }