0024166: Unable to create file with "Save" menu of voxeldemo Qt sample
[occt.git] / src / Aspect / Aspect_GradientBackground.cxx
CommitLineData
b311480e 1// Created on: 2010-05-21
2// Created by: PAUL SUPRYATKIN
3// Copyright (c) 2010-2012 OPEN CASCADE SAS
4//
5// The content of this file is subject to the Open CASCADE Technology Public
6// License Version 6.5 (the "License"). You may not use the content of this file
7// except in compliance with the License. Please obtain a copy of the License
8// at http://www.opencascade.org and read it completely before using this file.
9//
10// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12//
13// The Original Code and all software distributed under the License is
14// distributed on an "AS IS" basis, without warranty of any kind, and the
15// Initial Developer hereby disclaims all such warranties, including without
16// limitation, any warranties of merchantability, fitness for a particular
17// purpose or non-infringement. Please see the License for the specific terms
18// and conditions governing the rights and limitations under the License.
19
7fd59977 20
7fd59977 21
22
23
24#include <Aspect_GradientBackground.hxx>
25
26
27Aspect_GradientBackground::Aspect_GradientBackground () {
28
29 Quantity_Color Black (Quantity_NOC_BLACK);
30
31 SetColor( Black );
32 MyColor2 = Black;
33 MyGradientMethod = Aspect_GFM_NONE;
34
35}
36
37Aspect_GradientBackground::Aspect_GradientBackground( const Quantity_Color& AColor1,
38 const Quantity_Color& AColor2,
39 const Aspect_GradientFillMethod AMethod )
40{
41 SetColor( AColor1 );
42 MyColor2 = AColor2;
43 MyGradientMethod = AMethod;
44};
45
46
47void Aspect_GradientBackground::SetColors( const Quantity_Color& AColor1,
48 const Quantity_Color& AColor2,
49 const Aspect_GradientFillMethod AMethod )
50{
51 SetColor( AColor1 );
52 MyColor2 = AColor2;
53 MyGradientMethod = AMethod;
54}
55
56void Aspect_GradientBackground::Colors ( Quantity_Color& AColor1, Quantity_Color& AColor2) const
57{
58 AColor1 = Color();
59 AColor2 = MyColor2;
60}
61
62Aspect_GradientFillMethod Aspect_GradientBackground::BgGradientFillMethod( ) const
63{
64 return MyGradientMethod;
65}