DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Board.ih
1 /* -*- mode: c++ -*- */
9 /*
10  * \@copyright This File is part of the Board library which is
11  * licensed under the terms of the GNU Lesser General Public Licence.
12  * See the LICENCE file for further details.
13  */
14 
15 namespace LibBoard {
16 
17 inline
18 void
19 Board::clear( unsigned char red, unsigned char green, unsigned char blue )
20 {
21  clear( DGtal::Color( red, green, blue ) );
22 }
23 
24 inline
25 Board &
27 {
28  _state.lineStyle = style;
29  return *this;
30 }
31 
32 inline
33 Board &
35 {
36  _state.lineCap = cap;
37  return *this;
38 }
39 
40 inline
41 Board &
43 {
44  _state.lineJoin = join;
45  return *this;
46 }
47 
48 inline
49 void
50 Board::fillGouraudTriangle( const double x1, const double y1,
51  const DGtal::Color & color1,
52  const double x2, const double y2,
53  const DGtal::Color & color2,
54  const double x3, const double y3,
55  const DGtal::Color & color3,
56  unsigned char divisions,
57  int depthValue /* = -1 */ )
58 {
59  fillGouraudTriangle( Point( x1, y1 ), color1,
60  Point( x2, y2 ), color2,
61  Point( x3, y3 ), color3,
62  divisions, depthValue );
63 }
64 
65 inline
66 void
67 Board::fillGouraudTriangle( const double x1, const double y1,
68  const float brightness1,
69  const double x2, const double y2,
70  const float brightness2,
71  const double x3, const double y3,
72  const float brightness3,
73  unsigned char divisions,
74  int depthValue /* = -1 */ )
75 {
76  fillGouraudTriangle( Point( x1, y1 ), brightness1,
77  Point( x2, y2 ), brightness2,
78  Point( x3, y3 ), brightness3,
79  divisions, depthValue );
80 }
81 
82 } // namespace LibBoard