1 // Created on: 2010-05-21
2 // Created by: PAUL SUPRYATKIN
3 // Copyright (c) 2010-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #include <Aspect_GradientBackground.hxx>
19 Aspect_GradientBackground::Aspect_GradientBackground () {
21 Quantity_Color Black (Quantity_NOC_BLACK);
25 MyGradientMethod = Aspect_GradientFillMethod_None;
29 Aspect_GradientBackground::Aspect_GradientBackground( const Quantity_Color& AColor1,
30 const Quantity_Color& AColor2,
31 const Aspect_GradientFillMethod AMethod )
35 MyGradientMethod = AMethod;
39 void Aspect_GradientBackground::SetColors( const Quantity_Color& AColor1,
40 const Quantity_Color& AColor2,
41 const Aspect_GradientFillMethod AMethod )
45 MyGradientMethod = AMethod;
48 void Aspect_GradientBackground::Colors ( Quantity_Color& AColor1, Quantity_Color& AColor2) const
54 Aspect_GradientFillMethod Aspect_GradientBackground::BgGradientFillMethod( ) const
56 return MyGradientMethod;
59 // =======================================================================
60 // function : DumpJson
62 // =======================================================================
63 void Aspect_GradientBackground::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
65 OCCT_DUMP_CLASS_BEGIN (theOStream, Aspect_GradientBackground)
67 Quantity_Color aColor = Color();
68 OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aColor)
70 OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &MyColor2)
71 OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, MyGradientMethod)