------------------------------------------------------------------------------
| 2456 | |
| 2457 | //------------------------------------------------------------------------------ |
| 2458 | double vtkXYPlotActor::ComputeGlyphScale(int i, int* pos, int* pos2) |
| 2459 | { |
| 2460 | vtkPolyData* pd = this->LegendActor->GetEntrySymbol(i); |
| 2461 | // pd->Update(); |
| 2462 | double length = pd->GetLength(); |
| 2463 | double sf = this->GlyphSize * |
| 2464 | sqrt( |
| 2465 | (double)(pos[0] - pos2[0]) * (pos[0] - pos2[0]) + (pos[1] - pos2[1]) * (pos[1] - pos2[1])) / |
| 2466 | length; |
| 2467 | |
| 2468 | return sf; |
| 2469 | } |
| 2470 | |
| 2471 | //------------------------------------------------------------------------------ |
| 2472 | // This assumes that there are multiple polylines |
no test coverage detected