Lines Matching defs:curve
233 wxPlotCurve *curve = (wxPlotCurve*)node->GetData();
236 double range = curve->GetEndY() - curve->GetStartY();
237 double end = curve->GetEndY();
238 wxCoord offset_y = curve->GetOffsetY();
240 double dy = (end - curve->GetY( (wxInt32)(x/m_owner->GetZoom()) )) / range;
248 event1.SetCurve( curve );
252 if (curve != m_owner->GetCurrentCurve())
257 event2.SetCurve( curve );
260 m_owner->SetCurrentCurve( curve );
270 void wxPlotArea::DeleteCurve( wxPlotCurve *curve, int from, int to )
275 DrawCurve( &dc, curve, from, to );
278 void wxPlotArea::DrawCurve( wxDC *dc, wxPlotCurve *curve, int from, int to )
297 int start_x = wxMax( from, (int)floor(curve->GetStartX()*zoom) );
298 int end_x = wxMin( to, (int)floor(curve->GetEndX()*zoom) );
306 double range = curve->GetEndY() - curve->GetStartY();
307 double end = curve->GetEndY();
308 wxCoord offset_y = curve->GetOffsetY();
313 double dy = (end - curve->GetY( (wxInt32)(x/zoom) )) / range;
323 void wxPlotArea::DrawOnOffCurve( wxDC *dc, wxPlotOnOffCurve *curve, int from, int to )
342 int start_x = wxMax( from, (int)floor(curve->GetStartX()*zoom) );
343 int end_x = wxMin( to, (int)floor(curve->GetEndX()*zoom) );
350 wxCoord offset_y = curve->GetOffsetY();
353 if (curve->GetCount() == 0)
356 for (size_t index = 0; index < curve->GetCount(); index++)
358 wxPlotOnOff *p = curve->GetAt( index );
365 curve->DrawOffLine( *dc, client_height-offset_y, last_off, on );
371 curve->DrawOffLine( *dc, client_height-offset_y, last_off, on );
372 curve->DrawOnLine( *dc, client_height-offset_y, on, off, p->m_clientData );
377 wxPlotOnOff *p = curve->GetAt( curve->GetCount()-1 );
380 curve->DrawOffLine( *dc, client_height-offset_y, off, to );
413 wxPlotCurve *curve = (wxPlotCurve*) node->GetData();
415 if (curve == m_owner->GetCurrentCurve())
416 dc.SetPen( curve->GetPenSelected() );
418 dc.SetPen( curve->GetPenNormal() );
420 DrawCurve( &dc, curve, update_x-1, update_x+update_width+2 );
430 wxPlotOnOffCurve *curve = (wxPlotOnOffCurve*) node->GetData();
432 DrawOnOffCurve( &dc, curve, update_x-1, update_x+update_width+2 );
603 wxPlotCurve *curve = m_owner->GetCurrentCurve();
605 if (!curve) return;
612 double range = curve->GetEndY() - curve->GetStartY();
613 double offset = ((double) curve->GetOffsetY() / (double)client_height ) * range;
614 double start = curve->GetStartY() - offset;
615 double end = curve->GetEndY() - offset;
653 int y = (int)((curve->GetEndY()-current) / range * (double)client_height) - 1;
654 y -= curve->GetOffsetY();
797 void wxPlotWindow::Add( wxPlotCurve *curve )
799 m_curves.Append( curve );
800 if (!m_current) m_current = curve;
833 void wxPlotWindow::Delete( wxPlotCurve* curve )
835 wxList::compatibility_iterator node = m_curves.Find( curve );
838 m_curves.DeleteObject( curve );
840 m_area->DeleteCurve( curve );
843 if (curve == m_current) m_current = (wxPlotCurve *) NULL;
851 void wxPlotWindow::Add( wxPlotOnOffCurve *curve )
853 m_onOffCurves.Append( curve );
856 void wxPlotWindow::Delete( wxPlotOnOffCurve* curve )
858 wxList::compatibility_iterator node = m_onOffCurves.Find( curve );
861 m_onOffCurves.DeleteObject( curve );
878 void wxPlotWindow::Move( wxPlotCurve* curve, int pixels_up )
880 m_area->DeleteCurve( curve );
882 curve->SetOffsetY( curve->GetOffsetY() + pixels_up );
903 void wxPlotWindow::Enlarge( wxPlotCurve *curve, double factor )
905 m_area->DeleteCurve( curve );
910 double offset = (double)curve->GetOffsetY() / (double)client_height;
912 double range = curve->GetEndY() - curve->GetStartY();
920 double middle = curve->GetStartY() - offset + range/2;
922 curve->SetStartY( middle - new_range / 2 + new_offset );
923 curve->SetEndY( middle + new_range / 2 + new_offset );
927 curve->SetStartY( (curve->GetStartY() - offset)/factor + new_offset );
928 curve->SetEndY( (curve->GetEndY() - offset)/factor + new_offset );
955 wxPlotCurve *curve = (wxPlotCurve*) node->GetData();
956 if (curve->GetEndX() > max)
957 max = curve->GetEndX();
975 wxPlotCurve *curve = (wxPlotCurve*) node->GetData();
976 if (curve->GetEndX() > max)
977 max = curve->GetEndX();