Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:02

0001 // Created on: 1993-01-11
0002 // Created by: CKY / Contract Toubro-Larsen ( Niraj RANGWALA )
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IGESGraph_Color_HeaderFile
0018 #define _IGESGraph_Color_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <Standard_Real.hxx>
0023 #include <IGESData_ColorEntity.hxx>
0024 class TCollection_HAsciiString;
0025 
0026 
0027 class IGESGraph_Color;
0028 DEFINE_STANDARD_HANDLE(IGESGraph_Color, IGESData_ColorEntity)
0029 
0030 //! defines IGESColor, Type <314> Form <0>
0031 //! in package IGESGraph
0032 //!
0033 //! The Color Definition Entity is used to communicate the
0034 //! relationship of primary colors to the intensity level of
0035 //! the respective graphics devices as a percent of full
0036 //! intensity range.
0037 class IGESGraph_Color : public IGESData_ColorEntity
0038 {
0039 
0040 public:
0041 
0042   
0043   Standard_EXPORT IGESGraph_Color();
0044   
0045   //! This method is used to set the fields of the class Color
0046   //! - red        : Red   color intensity (range 0.0 to 100.0)
0047   //! - green      : Green color intensity (range 0.0 to 100.0)
0048   //! - blue       : Blue  color intensity (range 0.0 to 100.0)
0049   //! - aColorName : Name of the color (optional)
0050   Standard_EXPORT void Init (const Standard_Real red, const Standard_Real green, const Standard_Real blue, const Handle(TCollection_HAsciiString)& aColorName);
0051   
0052   Standard_EXPORT void RGBIntensity (Standard_Real& Red, Standard_Real& Green, Standard_Real& Blue) const;
0053   
0054   Standard_EXPORT void CMYIntensity (Standard_Real& Cyan, Standard_Real& Magenta, Standard_Real& Yellow) const;
0055   
0056   Standard_EXPORT void HLSPercentage (Standard_Real& Hue, Standard_Real& Lightness, Standard_Real& Saturation) const;
0057   
0058   //! returns True if optional character string is assigned,
0059   //! False otherwise.
0060   Standard_EXPORT Standard_Boolean HasColorName() const;
0061   
0062   //! if HasColorName() is True  returns the Verbal description of
0063   //! the Color.
0064   Standard_EXPORT Handle(TCollection_HAsciiString) ColorName() const;
0065 
0066 
0067 
0068 
0069   DEFINE_STANDARD_RTTIEXT(IGESGraph_Color,IGESData_ColorEntity)
0070 
0071 protected:
0072 
0073 
0074 
0075 
0076 private:
0077 
0078 
0079   Standard_Real theRed;
0080   Standard_Real theGreen;
0081   Standard_Real theBlue;
0082   Handle(TCollection_HAsciiString) theColorName;
0083 
0084 
0085 };
0086 
0087 
0088 
0089 
0090 
0091 
0092 
0093 #endif // _IGESGraph_Color_HeaderFile