This function aims to test the primitives provided by the 2D API.
| 64 | |
| 65 | // This function aims to test the primitives provided by the 2D API. |
| 66 | bool GL2PSMathTextOutputTest::Paint(vtkContext2D* painter) |
| 67 | { |
| 68 | painter->GetTextProp()->SetColor(.7, .4, .5); |
| 69 | painter->GetTextProp()->SetFontSize(30); |
| 70 | painter->DrawString(20, 100, "Bezier curve"); |
| 71 | painter->DrawMathTextString(20, 120, "$\\mathfrak{B\\'ezier\\/curve}:$"); |
| 72 | painter->GetTextProp()->SetFontSize(25); |
| 73 | painter->DrawMathTextString(40, 20, |
| 74 | "$B_{[0,n]}(t) = \\sum_{j=0}^{n}\\/t^j" |
| 75 | "\\left[" |
| 76 | "\\frac{n!}{(n-j)!}\\sum_{i=0}^{j}\\/" |
| 77 | "\\frac{(-1)^{i+j}P_i}{i!(j-i)!}" |
| 78 | "\\right] = " |
| 79 | "(1-t)B_{[0,n-1]}(t) + tB_{[1,n]}(t)$"); |
| 80 | return true; |
| 81 | } |
nothing calls this directly
no test coverage detected