0027105: Make code ISO-compliant [-Wpedantic fixes]
[occt.git] / src / Aspect / Aspect_GradientBackground.cxx
1 // Created on: 2010-05-21
2 // Created by: PAUL SUPRYATKIN
3 // Copyright (c) 2010-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #include <Aspect_GradientBackground.hxx>
17
18
19 Aspect_GradientBackground::Aspect_GradientBackground () {
20
21   Quantity_Color Black (Quantity_NOC_BLACK);
22
23   SetColor( Black );
24   MyColor2 = Black;
25   MyGradientMethod = Aspect_GFM_NONE;   
26
27 }
28
29 Aspect_GradientBackground::Aspect_GradientBackground( const Quantity_Color& AColor1,
30                                                       const Quantity_Color& AColor2,
31                                                       const Aspect_GradientFillMethod AMethod ) 
32 {
33   SetColor( AColor1 );
34   MyColor2 = AColor2;
35   MyGradientMethod = AMethod;
36 }
37
38
39 void Aspect_GradientBackground::SetColors( const Quantity_Color& AColor1,
40                                            const Quantity_Color& AColor2,
41                                            const Aspect_GradientFillMethod AMethod ) 
42 {
43   SetColor( AColor1 );
44   MyColor2 = AColor2;
45   MyGradientMethod = AMethod; 
46 }
47
48 void Aspect_GradientBackground::Colors ( Quantity_Color& AColor1, Quantity_Color& AColor2) const 
49 {
50   AColor1 = Color();
51   AColor2 = MyColor2;
52 }
53
54 Aspect_GradientFillMethod Aspect_GradientBackground::BgGradientFillMethod( ) const
55 {
56   return MyGradientMethod;
57 }