MCPcopy Create free account
hub / github.com/Kitware/VTK / Paint

Method Paint

Rendering/Matplotlib/Testing/Cxx/TestGL2PSMathTextOutput.cxx:66–81  ·  view source on GitHub ↗

This function aims to test the primitives provided by the 2D API.

Source from the content-addressed store, hash-verified

64
65// This function aims to test the primitives provided by the 2D API.
66bool 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}

Callers

nothing calls this directly

Calls 5

GetTextPropMethod · 0.80
SetFontSizeMethod · 0.80
SetColorMethod · 0.45
DrawStringMethod · 0.45
DrawMathTextStringMethod · 0.45

Tested by

no test coverage detected