0032306: Draw Harness, ViewerTest - move window message processing to TKService
[occt.git] / src / Aspect / Aspect_GradientBackground.cxx
CommitLineData
b311480e 1// Created on: 2010-05-21
2// Created by: PAUL SUPRYATKIN
973c2be1 3// Copyright (c) 2010-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 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
973c2be1 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.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
7fd59977 15
16#include <Aspect_GradientBackground.hxx>
17
18
19Aspect_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
29Aspect_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;
a3f6f591 36}
7fd59977 37
38
39void 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
48void Aspect_GradientBackground::Colors ( Quantity_Color& AColor1, Quantity_Color& AColor2) const
49{
50 AColor1 = Color();
51 AColor2 = MyColor2;
52}
53
54Aspect_GradientFillMethod Aspect_GradientBackground::BgGradientFillMethod( ) const
55{
56 return MyGradientMethod;
57}
a5162275 58
59// =======================================================================
60// function : DumpJson
61// purpose :
62// =======================================================================
63void Aspect_GradientBackground::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
64{
65 OCCT_DUMP_CLASS_BEGIN (theOStream, Aspect_GradientBackground)
66
67 Quantity_Color aColor = Color();
68 OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aColor)
69
70 OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &MyColor2)
71 OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, MyGradientMethod)
72}