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

Function ColorToString

IO/Export/vtkSVGContextDevice2D.cxx:48–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46{
47
48std::string ColorToString(const unsigned char* rgb)
49{
50 std::ostringstream out;
51 out << "#";
52 for (int i = 0; i < 3; ++i)
53 {
54 out << std::setw(2) << std::right << std::setfill('0') << std::hex
55 << static_cast<unsigned int>(rgb[i]);
56 }
57 return out.str();
58}
59
60// Bbox is xmin, xmax, ymin, ymax. Writes:
61// "xmin,ymin,xmax,ymax"

Callers 9

DrawPointsMethod · 0.70
DrawMarkersMethod · 0.70
ApplyPenColorToNodeMethod · 0.70
ApplyBrushColorToNodeMethod · 0.70
DrawLineGradientMethod · 0.70
DrawTriangleGradientMethod · 0.70

Calls 1

strMethod · 0.45

Tested by

no test coverage detected