MCPcopy Create free account
hub / github.com/Smorodov/Multitarget-tracker / DrawLine

Method DrawLine

src/Tracker/graph/gport.cpp:51–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50
51void GPostscriptPort::DrawLine (const int x1, const int y1, const int x2, const int y2)
52{
53 //PostscriptStream << x2 << " " << -y2 << " " << x1 << " " << -y1 << " " << PenWidth << " DrawLine" << endl;
54
55 PostscriptStream << " gsave" << std::endl;
56 PostscriptStream << PenWidth << " setlinewidth" << std::endl;
57 // We may not always want to set this as it works best with rectangular trees...
58// PostscriptStream << " 2 setlinecap" << endl;
59// PostscriptStream << " 0 setgray" << endl;
60 //PostscriptStream << " 0.7 setgray" << endl;
61 PostscriptStream << fill_r << " " << fill_g << " " << fill_b << " setrgbcolor" << std::endl;
62 PostscriptStream << x2 << " " << -y2 << " moveto" << std::endl;
63 PostscriptStream << x1 << " " << -y1 << " lineto" << std::endl;
64 PostscriptStream << " stroke" << std::endl;
65 PostscriptStream << " grestore" << std::endl;
66
67}
68
69void GPostscriptPort::DrawCircle (const GPoint &pt, const int radius)
70{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected