gui2::tline Class Reference

Definition of a line shape. More...

Inheritance diagram for gui2::tline:

Inheritance graph
[legend]
Collaboration diagram for gui2::tline:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 tline (const config &cfg)
void draw (surface &canvas, const game_logic::map_formula_callable &variables)
 Implement shape::draw().

Private Attributes

tformula< unsigned > x1_
tformula< unsigned > y1_
tformula< unsigned > x2_
tformula< unsigned > y2_
Uint32 colour_
unsigned thickness_
 The thickness of the line: if the value is odd the x and y are the middle of the line.


Detailed Description

Definition of a line shape.

Definition at line 57 of file canvas.cpp.


Constructor & Destructor Documentation

gui2::tline::tline ( const config cfg  ) 

Definition at line 81 of file canvas.cpp.

References DBG_G_P, and debug.


Member Function Documentation

void gui2::tline::draw ( surface canvas,
const game_logic::map_formula_callable variables 
) [virtual]

Implement shape::draw().

Implements gui2::tcanvas::tshape.

Definition at line 235 of file canvas.cpp.

References _, colour_, DBG_G_D, gui2::tcanvas::tshape::draw_line(), VALIDATE, x1_, x2_, y1_, and y2_.


Member Data Documentation

tformula<unsigned> gui2::tline::x1_ [private]

Definition at line 68 of file canvas.cpp.

Referenced by draw().

tformula<unsigned> gui2::tline::y1_ [private]

Definition at line 68 of file canvas.cpp.

Referenced by draw().

tformula<unsigned> gui2::tline::x2_ [private]

Definition at line 68 of file canvas.cpp.

Referenced by draw().

tformula<unsigned> gui2::tline::y2_ [private]

Definition at line 68 of file canvas.cpp.

Referenced by draw().

Uint32 gui2::tline::colour_ [private]

Definition at line 73 of file canvas.cpp.

Referenced by draw().

unsigned gui2::tline::thickness_ [private]

The thickness of the line: if the value is odd the x and y are the middle of the line.

if the value is even the x and y are the middle of a line with width - 1. (0 is special case, does nothing.)

Definition at line 78 of file canvas.cpp.


The documentation for this class was generated from the following file:

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs