- inline bool option_noticks() const { return _options & NOTICKS; }
- inline bool option_notext() const { return _options & NOTEXT; }
- inline bool option_top() const { return _options & TOP; }
- inline bool option_bottom() const { return _options & BOTTOM; }
-
- void draw_line( float x1, float y1, float x2, float y2) {
- _hud->_line_list.add(LineSegment(x1, y1, x2, y2));
- }
-
- void draw_stipple_line( float x1, float y1, float x2, float y2) {
- _hud->_stipple_line_list.add(LineSegment(x1, y1, x2, y2));
- }
-
- void draw_text( float x, float y, char *msg, int digit) {
- _hud->_text_list.add(HUDText(x, y, msg, digit));
- }
-
- float text_width(char *str) const {
- assert(_hud->_font_renderer);
- float r, l;
- _hud->_font->getBBox(str, _hud->_font_size, 0, &l, &r, 0, 0);
- return r - l;
- }
-
- void draw_circle(float x1, float y1, float r) const {
- glBegin(GL_LINE_LOOP);
- for (int count = 0; count < 25; count++) {
- float cosine = r * cos(count * 2 * SG_PI / 10.0);
- float sine = r * sin(count * 2 * SG_PI / 10.0);
- glVertex2f(cosine + x1, sine + y1);
- }
- glEnd();
- }
+ inline bool option_noticks() const { return (_options & NOTICKS) == NOTICKS; }
+ inline bool option_notext() const { return (_options & NOTEXT) == NOTEXT; }
+ inline bool option_top() const { return (_options & TOP) == TOP; }
+ inline bool option_bottom() const { return (_options & BOTTOM) == BOTTOM; }
+
+ void draw_line( float x1, float y1, float x2, float y2);
+ void draw_stipple_line( float x1, float y1, float x2, float y2);
+ void draw_text( float x, float y, char *msg, int digit);
+ float text_width(char *str) const;
+ void draw_circle(float x1, float y1, float r) const;
+ void draw_bullet(float, float, float);