Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-14 09:13:40

0001 // Created on: 2010-05-21
0002 // Created by: PAUL SUPRYATKIN
0003 // Copyright (c) 2010-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _Aspect_GradientBackground_HeaderFile
0017 #define _Aspect_GradientBackground_HeaderFile
0018 
0019 #include <Aspect_GradientFillMethod.hxx>
0020 #include <Aspect_Background.hxx>
0021 
0022 //! This class allows the definition of a window gradient background.
0023 class Aspect_GradientBackground : public Aspect_Background
0024 {
0025 public:
0026   DEFINE_STANDARD_ALLOC
0027 
0028   //! Creates a window gradient background.
0029   //! Default color is Quantity_NOC_BLACK.
0030   //! Default fill method is Aspect_GradientFillMethod_None.
0031   Standard_EXPORT Aspect_GradientBackground();
0032 
0033   //! Creates a window gradient background with two colours.
0034   Standard_EXPORT Aspect_GradientBackground(
0035     const Quantity_Color&           theColor1,
0036     const Quantity_Color&           theColor2,
0037     const Aspect_GradientFillMethod theMethod = Aspect_GradientFillMethod_Horizontal);
0038 
0039   //! Modifies the colours of the window gradient background.
0040   Standard_EXPORT void SetColors(
0041     const Quantity_Color&           theColor1,
0042     const Quantity_Color&           theColor2,
0043     const Aspect_GradientFillMethod theMethod = Aspect_GradientFillMethod_Horizontal);
0044 
0045   //! Returns colours of the window gradient background.
0046   Standard_EXPORT void Colors(Quantity_Color& theColor1, Quantity_Color& theColor2) const;
0047 
0048   //! Returns the current gradient background fill mode.
0049   Standard_EXPORT Aspect_GradientFillMethod BgGradientFillMethod() const;
0050 
0051   //! Dumps the content of me into the stream
0052   Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const;
0053 
0054 private:
0055   Quantity_Color            MyColor2;
0056   Aspect_GradientFillMethod MyGradientMethod;
0057 };
0058 
0059 #endif // _Aspect_GradientBackground_HeaderFile