| 65 | vtkStandardNewMacro(GL2PSMathTextScalingTest); |
| 66 | |
| 67 | bool GL2PSMathTextScalingTest::Paint(vtkContext2D* painter) |
| 68 | { |
| 69 | painter->GetBrush()->SetColor(50, 50, 128); |
| 70 | painter->DrawRect(0, 0, 500, 500); |
| 71 | |
| 72 | painter->GetTextProp()->SetColor(.7, .4, .5); |
| 73 | painter->GetTextProp()->SetJustificationToLeft(); |
| 74 | painter->GetTextProp()->SetVerticalJustificationToCentered(); |
| 75 | painter->GetTextProp()->UseTightBoundingBoxOn(); |
| 76 | |
| 77 | for (int i = 0; i < 10; ++i) |
| 78 | { |
| 79 | int fontSize = 5 + i * 3; |
| 80 | float y = 500 - ((pow(i, 1.2) + 0.5) * 30); |
| 81 | painter->GetTextProp()->SetFontSize(fontSize); |
| 82 | painter->DrawString(5, y, "Text"); |
| 83 | painter->DrawMathTextString(120, y, "MathText$\\ast$"); |
| 84 | } |
| 85 | |
| 86 | return true; |
| 87 | } |
nothing calls this directly
no test coverage detected