------------------------------------------------------------------------------
| 903 | |
| 904 | //------------------------------------------------------------------------------ |
| 905 | void vtkMatplotlibMathTextUtilities::ComputeTextColors(vtkTextProperty* tprop, TextColors& tcolors) |
| 906 | { |
| 907 | double* fgColor = tprop->GetColor(); |
| 908 | tcolors.fgR = static_cast<unsigned char>(fgColor[0] * 255); |
| 909 | tcolors.fgG = static_cast<unsigned char>(fgColor[1] * 255); |
| 910 | tcolors.fgB = static_cast<unsigned char>(fgColor[2] * 255); |
| 911 | tcolors.fgA = tprop->GetOpacity(); |
| 912 | |
| 913 | double* bgColor = tprop->GetBackgroundColor(); |
| 914 | tcolors.bgR = static_cast<unsigned char>(bgColor[0] * 255); |
| 915 | tcolors.bgG = static_cast<unsigned char>(bgColor[1] * 255); |
| 916 | tcolors.bgB = static_cast<unsigned char>(bgColor[2] * 255); |
| 917 | tcolors.bgA = tprop->GetBackgroundOpacity(); |
| 918 | tcolors.hasBackground = (static_cast<unsigned char>(tcolors.bgA * 255) != 0); |
| 919 | |
| 920 | double* frameColor = tprop->GetFrameColor(); |
| 921 | tcolors.frR = static_cast<unsigned char>(frameColor[0] * 255); |
| 922 | tcolors.frG = static_cast<unsigned char>(frameColor[1] * 255); |
| 923 | tcolors.frB = static_cast<unsigned char>(frameColor[2] * 255); |
| 924 | tcolors.hasFrame = tprop->GetFrame() && tprop->GetFrameWidth() > 0; |
| 925 | tcolors.frW = tprop->GetFrameWidth(); |
| 926 | } |
| 927 | |
| 928 | //------------------------------------------------------------------------------ |
| 929 | bool vtkMatplotlibMathTextUtilities::SetMathTextFont(vtkTextProperty* tprop) |
no test coverage detected