DGtal 1.3.0
Loading...
Searching...
No Matches
Board.ih
1/* -*- mode: c++ -*- */
2/**
3 * @file
4 * @author Sebastien Fourey <http://www.greyc.ensicaen.fr/~seb>
5 * @date Sat Aug 18 2007
6 *
7 * @brief Definition of inline methods of the Board class.
8 */
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
15namespace LibBoard {
16
17inline
18void
19Board::clear( unsigned char red, unsigned char green, unsigned char blue )
20{
21 clear( DGtal::Color( red, green, blue ) );
22}
23
24inline
25Board &
26Board::setLineStyle( Shape::LineStyle style )
27{
28 _state.lineStyle = style;
29 return *this;
30}
31
32inline
33Board &
34Board::setLineCap( Shape::LineCap cap )
35{
36 _state.lineCap = cap;
37 return *this;
38}
39
40inline
41Board &
42Board::setLineJoin( Shape::LineJoin join )
43{
44 _state.lineJoin = join;
45 return *this;
46}
47
48inline
49void
50Board::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
65inline
66void
67Board::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