initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / test / Gstream / GsTest.C
blob61e3581ae5d6f8fa196d4a4bfe0dd60f2a6aa610
1 #include "Xstream.H"
2 #include "GLstream.H"
3 #include "PSstream.H"
4 #include "shapes2D.H"
5 #include "IStringStream.H"
7 using namespace Foam;
9 int main()
11     colour mauve("mauve", 1, 0, 1);
13     lineStyle solid("Solid", 2.0, 2.0, IStringStream("1(1.0)")());
14     lineStyle broken("Broken", 2.0, 10.0, IStringStream("4(1 1 4 1)")());
17     //Xstream wind
18     GLstream wind
19     //PSstream wind
20     (
21         "GsTest",
22         primary("Black"),
23         primary("White"),
24         0.5, 0.5, 0.5, 0.5, 500, 500
25     );
27     do
28     {
29         wind << rectangle2D(point2D(0.0, 0.0), point2D(100.0, 100.0));
31         wind.setColour(mauve);
32         wind.setLineStyle(solid);
34         wind << line2D(point2D(0.0, 0.0), point2D(0.0, 200.0));
35         wind << line2D(point2D(0.0, 200.0), point2D(200.0, 200.0));
37         //wind.setLineStyle(broken);
39         wind << line2D(point2D(200.0, 200.0), point2D(200.0, 0.0));
40         wind << line2D(point2D(200.0, 0.0), point2D(0.0, 0.0));
42         wind << string2D(point2D(200.0, 0.0), "Hi there");
44     } while (wind.waitForEvent());
46     return 0;