/[gzz]/gzz/gfx/liblines/Lines.hxx
ViewVC logotype

Diff of /gzz/gfx/liblines/Lines.hxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by mudyc, Sat Nov 2 20:08:08 2002 UTC revision 1.6 by mudyc, Wed Dec 18 16:16:51 2002 UTC
# Line 11  namespace Lines { Line 11  namespace Lines {
11    
12      //PREDBGVAR(dbg);      //PREDBGVAR(dbg);
13    
14        using std::string;
15      using std::vector;      using std::vector;
16      using std::ostream;      using std::ostream;
17      using std::cout;      using std::cout;
18    
19      using Vec23::ZPt;      using Vec23::ZPt;
20    
21      class Lines {      class SimpleLine {
22          float linewidth;          float linewidth;
23          bool has_not_inited;          bool has_not_inited;
24    
# Line 25  namespace Lines { Line 26  namespace Lines {
26          void init();          void init();
27    
28      public:      public:
29          Lines(float l): linewidth(l), has_not_inited(true) { }          SimpleLine(float l): linewidth(l), has_not_inited(true) { }
30          ~Lines();          ~SimpleLine();
31    
32          /** Draws a line from point a to b.          /** Draws a line from point a to b.
33           *  You have to transform a and b _before_           *  You have to transform a and b _before_
34           */           */
35          void draw(ZPt a, ZPt b);          void draw(ZPt a, ZPt b);
36      };      };
37    
38    
39        /** ContinuousLine is line constructed from various points.
40         *  It bends in given points.
41         */
42        class ContinuousLine {
43        private:
44          vector<float> points;
45          bool foo;
46        public:
47            /** ContinuousLine is line constructed from various points.
48             *  It bends in given points.
49             * @params
50             * textId = texture's id - must be > 0.
51             * corner_behaviour =
52             *     "Bevel", "Miter" or "Round"
53             */
54            ContinuousLine(int textId, string corner_behaviour, float linewidth);
55            ~ContinuousLine();
56    
57            /** Add new point at the end of line.
58             */
59            void add(float * point);
60    
61            /** Join first and last point.
62             */
63            void makeChain();
64    
65            /** Draw the continuous line.
66             */
67            void draw();
68        };
69    
70    
71  }  }
72    
73  #endif  #endif

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26